diff --git a/_alp/Agents/Zero_Loader/Code/Functions.java b/_alp/Agents/Zero_Loader/Code/Functions.java index 013d765..73995a9 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.java +++ b/_alp/Agents/Zero_Loader/Code/Functions.java @@ -260,7 +260,6 @@ else if(RegionCoords.startsWith("LineString")){ solarpark = energyModel.add_EnergyProductionSites(); solarpark.set_p_gridConnectionID( dataSolarfarm.gc_id() ); - //Set Address solarpark.p_address = new J_Address(dataSolarfarm.streetname(), dataSolarfarm.house_number(), @@ -304,7 +303,8 @@ else if(RegionCoords.startsWith("LineString")){ } } if(gridNodeProfileLoaderType != OL_GridNodeProfileLoaderType.INCLUDE_PV || gridNodeProfileLoaderType != OL_GridNodeProfileLoaderType.NET_LOAD){ - f_addEnergyProduction(solarpark, OL_EnergyAssetType.PHOTOVOLTAIC, "Solar farm" , dataSolarfarm.capacity_electric_kw()); + f_addPVProductionAsset(solarpark, "Solar farm" , dataSolarfarm.capacity_electric_kw(), dataSolarfarm.orientation()); + //f_addEnergyProduction(solarpark, OL_EnergyAssetType.PHOTOVOLTAIC, "Solar farm" , dataSolarfarm.capacity_electric_kw()); } //Set owner @@ -611,7 +611,8 @@ else if(RegionCoords.startsWith("LineString")){ windfarm.v_isActive = dataWindfarm.initially_active(); //Create EA for the windturbine GC - f_addEnergyProduction(windfarm, OL_EnergyAssetType.WINDMILL, "Windmill onshore", dataWindfarm.capacity_electric_kw()); + f_addWindProductionAsset(windfarm, "Windmill onshore", dataWindfarm.capacity_electric_kw()); + //f_addEnergyProduction(windfarm, OL_EnergyAssetType.WINDMILL, "Windmill onshore", dataWindfarm.capacity_electric_kw()); //Set owner ConnectionOwner owner; @@ -1016,38 +1017,6 @@ GIS_Building f_createGISBuilding(Building_data buildingData,GridConnection paren } /*ALCODEEND*/} -double f_addEnergyProduction(GridConnection parentGC,OL_EnergyAssetType asset_type,String asset_name,double installedPower_kW) -{/*ALCODESTART::1726584205809*/ -double assetCapacity_kW = 0; -J_TimeParameters timeParameters = energyModel.p_timeParameters; -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, timeParameters, profilePointer); - - -/*ALCODEEND*/} - GIS_Object f_createGISObject(String name,double latitude,double longitude,String polygon,OL_GISObjectType GISObjectType) {/*ALCODESTART::1726584205811*/ GIS_Object area = energyModel.add_pop_GIS_Objects(); @@ -1529,7 +1498,8 @@ else if (vehicle_type == OL_EnergyAssetType.PETROLEUM_FUEL_VAN){ pv_installed_kwp = 0.0; } if(pv_installed_kwp != null && pv_installed_kwp > 0){ - f_addEnergyProduction(companyGC, OL_EnergyAssetType.PHOTOVOLTAIC, "Rooftop Solar", pv_installed_kwp); + f_addPVProductionAsset(companyGC, "Rooftop Solar", pv_installed_kwp, OL_PVOrientation.SOUTH); + //f_addEnergyProduction(companyGC, OL_EnergyAssetType.PHOTOVOLTAIC, "Rooftop Solar", pv_installed_kwp); current_scenario_list.setCurrentPV_kW(roundToInt(pv_installed_kwp)); future_scenario_list.setPlannedPV_kW(roundToInt(pv_installed_kwp)); @@ -2367,7 +2337,8 @@ else if(!settings.createCurrentElectricityEA()){//input boolean: Dont create cur 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()); + f_addPVProductionAsset(companyGC, "Rooftop Solar", (double) gridConnection.getSupply().getPvInstalledKwp(), OL_PVOrientation.SOUTH); //NEEDS FIXING + //f_addEnergyProduction(companyGC, OL_EnergyAssetType.PHOTOVOLTAIC, "Rooftop Solar", gridConnection.getSupply().getPvInstalledKwp()); //add to scenario: current current_scenario_list.setCurrentPV_kW(gridConnection.getSupply().getPvInstalledKwp()); @@ -2375,7 +2346,8 @@ else if(!settings.createCurrentElectricityEA()){//input boolean: Dont create cur } //Wind if (gridConnection.getSupply().getWindInstalledKw() != null && gridConnection.getSupply().getWindInstalledKw() > 0){ - f_addEnergyProduction(companyGC, OL_EnergyAssetType.WINDMILL, "Wind mill", gridConnection.getSupply().getWindInstalledKw()); + f_addWindProductionAsset(companyGC, "Wind mill", gridConnection.getSupply().getWindInstalledKw()); + //f_addEnergyProduction(companyGC, OL_EnergyAssetType.WINDMILL, "Wind mill", gridConnection.getSupply().getWindInstalledKw()); //add to scenario: current current_scenario_list.setCurrentWind_kW(gridConnection.getSupply().getWindInstalledKw()); @@ -2981,6 +2953,8 @@ GridNode f_createHeatGridNode() gridnode_id(gridNodeID). initially_active(false). +orientation(OL_PVOrientation.SOUTH). + capacity_electric_kw(0.0). connection_capacity_kw(0.0). contracted_delivery_capacity_kw(0.0). @@ -3143,8 +3117,8 @@ J_ProfilePointer f_createEngineProfile(String profileID,double[] arguments,doubl //Create Weather engine profiles energyModel.pp_ambientTemperature_degC = f_createEngineProfile("ambient_temperature_degC", a_arguments_hr, a_ambientTemperatureProfile_degC, OL_ProfileUnits.TEMPERATURE_DEGC); -energyModel.pp_PVProduction35DegSouth_fr = f_createEngineProfile("pv_production_south_fr", a_arguments_hr, a_PVProductionProfile35DegSouth_fr, OL_ProfileUnits.NORMALIZEDPOWER); -energyModel.pp_PVProduction15DegEastWest_fr = f_createEngineProfile("pv_production_eastwest_fr", a_arguments_hr, a_PVProductionProfile15DegEastWest_fr, OL_ProfileUnits.NORMALIZEDPOWER); +energyModel.pp_PVProduction35DegSouth_fr = f_createEngineProfile("pv_production_35degsouth_fr", a_arguments_hr, a_PVProductionProfile35DegSouth_fr, OL_ProfileUnits.NORMALIZEDPOWER); +energyModel.pp_PVProduction15DegEastWest_fr = f_createEngineProfile("pv_production_15degeastwest_fr", a_arguments_hr, a_PVProductionProfile15DegEastWest_fr, OL_ProfileUnits.NORMALIZEDPOWER); energyModel.pp_windProduction_fr = f_createEngineProfile("wind_production_fr", a_arguments_hr, a_windProductionProfile_fr, OL_ProfileUnits.NORMALIZEDPOWER); //Create Epex engine profile @@ -3256,7 +3230,8 @@ else if (maxFeedin_kWh > 0 && !isPvPowerKnownAndPositive){ pvPower_kW = 2.5 * (maxFeedin_kWh/energyModel.p_timeParameters.getTimeStep_h()); // Estimation needed for pv power traceln("PV Power has been estimated!"); f_createPreprocessedElectricityProfile_PV(GC_GridNode_profile, a_yearlyElectricityDelivery_kWh, a_yearlyElectricityFeedin_kWh, null, pvPower_kW, null); - f_addEnergyProduction(GC_GridNode_profile, OL_EnergyAssetType.PHOTOVOLTAIC, "Total current Solar on GridNode", pvPower_kW); + f_addPVProductionAsset(GC_GridNode_profile, "Total current Solar on GridNode", pvPower_kW, OL_PVOrientation.SOUTH); + //f_addEnergyProduction(GC_GridNode_profile, OL_EnergyAssetType.PHOTOVOLTAIC, "Total current Solar on GridNode", pvPower_kW); } else { //EXCLUDE_PV throw new RuntimeException("Grid node profile contains feed-in but no PV power is found in Building_data for EXCLUDE_PV. This is not allowed."); @@ -3268,7 +3243,8 @@ else if (maxFeedin_kWh > 0 && !isPvPowerKnownAndPositive){ } f_createPreprocessedElectricityProfile_PV(GC_GridNode_profile, a_yearlyElectricityDelivery_kWh, a_yearlyElectricityFeedin_kWh, null, pvPower_kW, null); if (gridnode.p_profileType == OL_GridNodeProfileLoaderType.INCLUDE_PV){ - f_addEnergyProduction(GC_GridNode_profile, OL_EnergyAssetType.PHOTOVOLTAIC, "Total current Solar on GridNode", pvPower_kW); + f_addPVProductionAsset(GC_GridNode_profile, "Total current Solar on GridNode", pvPower_kW, OL_PVOrientation.SOUTH); + //f_addEnergyProduction(GC_GridNode_profile, OL_EnergyAssetType.PHOTOVOLTAIC, "Total current Solar on GridNode", pvPower_kW); } } } @@ -3569,7 +3545,7 @@ else if (houseBuildingData.insulation_label() != null) { 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 //Create and add EnergyAssets - f_addEnergyAssetsToHouses(GCH, houseBuildingData.electricity_consumption_kwhpa(), houseBuildingData.gas_consumption_m3pa(), houseBuildingData.heating_type(), houseBuildingData.cooking_type()); + f_addEnergyAssetsToHouses(GCH, houseBuildingData.electricity_consumption_kwhpa(), houseBuildingData.gas_consumption_m3pa(), houseBuildingData.heating_type(), houseBuildingData.cooking_type(), houseBuildingData.pv_orientation()); i++; } @@ -3584,7 +3560,7 @@ else if (houseBuildingData.insulation_label() != null) { //traceln("Total space heat demand houses input " + roundToDecimal(totalSpaceHeatDemand_kwhpa/1000000,3) + "GWh"); /*ALCODEEND*/} -double f_addEnergyAssetsToHouses(GCHouse house,Double electricityDemand_kwhpa,Double gasDemand_m3pa,OL_GridConnectionHeatingType heatingType,OL_HouseholdCookingMethod cookingType) +double f_addEnergyAssetsToHouses(GCHouse house,Double electricityDemand_kwhpa,Double gasDemand_m3pa,OL_GridConnectionHeatingType heatingType,OL_HouseholdCookingMethod cookingType,OL_PVOrientation pvOrientation) {/*ALCODESTART::1749728889986*/ //Add generic electricity demand profile GridNode gn = findFirst(energyModel.pop_gridNodes, x -> x.p_gridNodeID.equals( house.p_parentNodeElectricID)); @@ -3603,7 +3579,7 @@ else if (houseBuildingData.insulation_label() != null) { //Add pv -f_addPVToHouses(house, gn); +f_addPVToHouses(house, gn, pvOrientation); //Add cars f_addCarsToHouses(house); @@ -5216,7 +5192,7 @@ Double f_getGNTotalPV_kWp(GridNode GN) return totalPVPower_kW; /*ALCODEEND*/} -double f_addPVToHouses(GCHouse house,GridNode gn) +double f_addPVToHouses(GCHouse house,GridNode gn,OL_PVOrientation pvOrientation) {/*ALCODESTART::1770037586816*/ double installedRooftopSolar_kW = house.v_liveAssetsMetaData.initialPV_kW != null ? house.v_liveAssetsMetaData.initialPV_kW : 0; @@ -5225,7 +5201,50 @@ Double f_getGNTotalPV_kWp(GridNode GN) } if (installedRooftopSolar_kW > 0) { - f_addEnergyProduction(house, OL_EnergyAssetType.PHOTOVOLTAIC, "Residential Solar", installedRooftopSolar_kW ); + f_addPVProductionAsset(house, "Residential Solar", installedRooftopSolar_kW, pvOrientation); + //f_addEnergyProduction(house, OL_EnergyAssetType.PHOTOVOLTAIC, "Residential Solar", installedRooftopSolar_kW); +} +/*ALCODEEND*/} + +double f_addPVProductionAsset(GridConnection parentGC,String asset_name,double installedPower_kW,OL_PVOrientation pvOrientation) +{/*ALCODESTART::1773414911038*/ +J_TimeParameters timeParameters = energyModel.p_timeParameters; +OL_EnergyCarriers energyCarrier = OL_EnergyCarriers.ELECTRICITY; +J_ProfilePointer profilePointer = f_getPVTProfilePointer(pvOrientation); + +J_EAProduction production_asset = new J_EAProduction(parentGC, OL_EnergyAssetType.PHOTOVOLTAIC, asset_name, energyCarrier, installedPower_kW, timeParameters, profilePointer); +/*ALCODEEND*/} + +J_ProfilePointer f_getPVTProfilePointer(OL_PVOrientation pvtOrientation) +{/*ALCODESTART::1773414911040*/ +J_ProfilePointer profilePointer = null; + +switch (pvtOrientation){ + case EASTWEST: + profilePointer = energyModel.pp_PVProduction15DegEastWest_fr; + case SOUTH: + profilePointer = energyModel.pp_PVProduction35DegSouth_fr; } + +return profilePointer; +/*ALCODEEND*/} + +double f_addWindProductionAsset(GridConnection parentGC,String asset_name,double installedPower_kW) +{/*ALCODESTART::1773414911042*/ +J_TimeParameters timeParameters = energyModel.p_timeParameters; +OL_EnergyCarriers energyCarrier = OL_EnergyCarriers.ELECTRICITY; +J_ProfilePointer profilePointer = energyModel.pp_windProduction_fr; + +J_EAProduction production_asset = new J_EAProduction(parentGC, OL_EnergyAssetType.WINDMILL, asset_name, energyCarrier, installedPower_kW, timeParameters, profilePointer); +/*ALCODEEND*/} + +double f_addPTProductionAsset(GridConnection parentGC,String asset_name,double installedPower_kW,OL_PVOrientation ptOrientation) +{/*ALCODESTART::1773414911044*/ +//CONCEPT VERSION +J_TimeParameters timeParameters = energyModel.p_timeParameters; +OL_EnergyCarriers energyCarrier = OL_EnergyCarriers.HEAT; +J_ProfilePointer profilePointer = f_getPVTProfilePointer(ptOrientation); + +J_EAProduction production_asset = new J_EAProduction(parentGC, OL_EnergyAssetType.PHOTOVOLTAIC, asset_name, energyCarrier, installedPower_kW, timeParameters, profilePointer); /*ALCODEEND*/} diff --git a/_alp/Agents/Zero_Loader/Code/Functions.xml b/_alp/Agents/Zero_Loader/Code/Functions.xml index 4817ad8..a6a185c 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.xml +++ b/_alp/Agents/Zero_Loader/Code/Functions.xml @@ -315,38 +315,6 @@ true - - VOID - double - 1726584205809 - - 1320 - 190 - - false - true - true - - - - - - - - - - - - - - - - - - RETURNS_VALUE GIS_Object @@ -463,7 +431,7 @@ 1726584205827 1320 - 620 + 590 @@ -1859,7 +1831,7 @@ verbruik = levering + productie - teruglevering]]> 1753883660006 1320 - 295 + 325 - + VOID double 1768486498278 @@ -2855,6 +2827,122 @@ verbruik = levering + productie - teruglevering]]> + + + + + + + + VOID + double + 1773414911038 + + 1320 + 210 + + false + true + true + + + + + + + + + + + + + + + + + + + + RETURNS_VALUE + J_ProfilePointer + 1773414911040 + + 1340 + 230 + + false + true + true + + + + + + + + VOID + double + 1773414911042 + + 1320 + 170 + + false + true + true + + + + + + + + + + + + + + + + VOID + double + 1773414911044 + + 1320 + 190 + + false + true + true + + + + + + + + + + + + + + + + diff --git a/_alp/Agents/tabElectricity/Code/Functions.java b/_alp/Agents/tabElectricity/Code/Functions.java index a08771c..9bf4c70 100644 --- a/_alp/Agents/tabElectricity/Code/Functions.java +++ b/_alp/Agents/tabElectricity/Code/Functions.java @@ -75,7 +75,8 @@ 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_timeParameters, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr ); + J_ProfilePointer profilePointer = f_getPVTProfilePointer(house.v_liveAssetsMetaData.PVOrientation); + J_EAProduction productionAsset = new J_EAProduction ( house, OL_EnergyAssetType.PHOTOVOLTAIC, assetName, OL_EnergyCarriers.ELECTRICITY, installedPVCapacity_kW, zero_Interface.energyModel.p_timeParameters, profilePointer ); houses.remove(house); zero_Interface.c_orderedPVSystemsHouses.remove(house); zero_Interface.c_orderedPVSystemsHouses.add(0, house); @@ -271,7 +272,8 @@ Pair f_getPVSystemPercentage(List gcList) 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_timeParameters, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr ); + J_ProfilePointer profilePointer = f_getPVTProfilePointer(gc.v_liveAssetsMetaData.PVOrientation); + J_EAProduction productionAsset = new J_EAProduction ( gc, assetType, assetName, OL_EnergyCarriers.ELECTRICITY, capacity_kWp, zero_Interface.energyModel.p_timeParameters, profilePointer ); } // Update the ordered collection @@ -753,3 +755,17 @@ else if(productionEA.getEAType() == OL_EnergyAssetType.WINDMILL){ } /*ALCODEEND*/} +J_ProfilePointer f_getPVTProfilePointer(OL_PVOrientation pvtOrientation) +{/*ALCODESTART::1773764103422*/ +J_ProfilePointer profilePointer = null; + +switch (pvtOrientation){ + case EASTWEST: + profilePointer = zero_Interface.energyModel.pp_PVProduction15DegEastWest_fr; + case SOUTH: + profilePointer = zero_Interface.energyModel.pp_PVProduction35DegSouth_fr; +} + +return profilePointer; +/*ALCODEEND*/} + diff --git a/_alp/Agents/tabElectricity/Code/Functions.xml b/_alp/Agents/tabElectricity/Code/Functions.xml index 57b6bf4..e3e49b8 100644 --- a/_alp/Agents/tabElectricity/Code/Functions.xml +++ b/_alp/Agents/tabElectricity/Code/Functions.xml @@ -449,4 +449,24 @@ true + + RETURNS_VALUE + J_ProfilePointer + 1773764103422 + + 400 + 790 + + false + true + true + + + + + + diff --git a/_alp/Classes/Class.Building_data.java b/_alp/Classes/Class.Building_data.java index 6ba2695..7ade1b4 100644 --- a/_alp/Classes/Class.Building_data.java +++ b/_alp/Classes/Class.Building_data.java @@ -27,6 +27,7 @@ public class Building_data { Double gas_consumption_m3pa; Double pv_installed_kwp; Double pv_potential_kwp; + OL_PVOrientation pv_orientation; OL_GridConnectionEnergyLabel energy_label; Boolean has_private_parking; String gridnode_id; diff --git a/_alp/Classes/Class.Solarfarm_data.java b/_alp/Classes/Class.Solarfarm_data.java index f436d1c..d5d7f9d 100644 --- a/_alp/Classes/Class.Solarfarm_data.java +++ b/_alp/Classes/Class.Solarfarm_data.java @@ -17,6 +17,7 @@ public class Solarfarm_data { String city; String gridnode_id; boolean initially_active; + OL_PVOrientation orientation; boolean isSliderGC; double capacity_electric_kw; double connection_capacity_kw;