Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions _alp/Agents/UI_company/Levels/Level.level.xml
Original file line number Diff line number Diff line change
Expand Up @@ -643,8 +643,7 @@ for (J_EA j_ea : c_ownedGridConnections.get(v_currentSelectedGCnr).c_energyAsset
}
if (j_ea instanceof J_EAProfile) {
if (((J_EAProfile) j_ea).energyCarrier== OL_EnergyCarriers.HEAT) {
((J_EAProfile) j_ea).resetEnergyProfile();
((J_EAProfile) j_ea).scaleEnergyProfile(consumptionScaling_fr);
((J_EAProfile) j_ea).setProfileScaling_fr( consumptionScaling_fr );
}
}
}
Expand Down Expand Up @@ -822,8 +821,7 @@ for (J_EA j_ea : c_ownedGridConnections.get(v_currentSelectedGCnr).c_energyAsset
}
if (j_ea instanceof J_EAProfile) {
if (((J_EAProfile) j_ea).energyCarrier == OL_EnergyCarriers.ELECTRICITY) {
((J_EAProfile) j_ea).resetEnergyProfile();
((J_EAProfile) j_ea).scaleEnergyProfile(consumptionScaling_fr);
((J_EAProfile) j_ea).setProfileScaling_fr( consumptionScaling_fr );
}
}
}
Expand Down
21 changes: 10 additions & 11 deletions _alp/Agents/tabElectricity/Code/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@
// Set Profile Assets
for (J_EAProfile j_ea : gc.c_profileAssets) {
if (j_ea.energyCarrier == OL_EnergyCarriers.ELECTRICITY) {
j_ea.resetEnergyProfile();
j_ea.scaleEnergyProfile( scalingFactor );
j_ea.setProfileScaling_fr( scalingFactor );
}
}

Expand Down Expand Up @@ -484,9 +483,9 @@ else if(gr_electricitySliders_residential.isVisible()){
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 currentTotalEnergyConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh);
totalBaseConsumption_kWh += currentTotalEnergyConsumption_kWh/profileEA.getProfileScaling_fr();
totalSavedConsumption_kWh += currentTotalEnergyConsumption_kWh/profileEA.getProfileScaling_fr() - currentTotalEnergyConsumption_kWh;
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;
Expand Down Expand Up @@ -602,9 +601,9 @@ else if(GC instanceof GCGridBattery){
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 currentTotalEnergyConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh);
totalBaseConsumption_kWh += currentTotalEnergyConsumption_kWh/profileEA.getProfileScaling_fr();
totalSavedConsumption_kWh += currentTotalEnergyConsumption_kWh/profileEA.getProfileScaling_fr() - currentTotalEnergyConsumption_kWh;
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;
Expand Down Expand Up @@ -641,9 +640,9 @@ else if(GC instanceof GCGridBattery){
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 currentTotalEnergyConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh);
totalBaseConsumption_kWh += currentTotalEnergyConsumption_kWh/profileEA.getProfileScaling_fr();
totalSavedConsumption_kWh += currentTotalEnergyConsumption_kWh/profileEA.getProfileScaling_fr() - currentTotalEnergyConsumption_kWh;
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;
Expand Down
15 changes: 7 additions & 8 deletions _alp/Agents/tabHeating/Code/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ int f_setHeatingSystemsCompanies(List<GCUtility> gcList,ShapeSlider sliderGasbur
// Set Profile Assets
for (J_EAProfile j_ea : gc.c_profileAssets) {
if (j_ea.energyCarrier == OL_EnergyCarriers.HEAT) {
j_ea.resetEnergyProfile();
j_ea.scaleEnergyProfile( scalingFactor );
j_ea.setProfileScaling_fr( scalingFactor );
}
}

Expand Down Expand Up @@ -676,9 +675,9 @@ else if(gr_heatingSliders_residential.isVisible()){
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 currentTotalEnergyConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh);
totalBaseConsumption_kWh += currentTotalEnergyConsumption_kWh/profileEA.getProfileScaling_fr();
totalSavedConsumption_kWh += currentTotalEnergyConsumption_kWh/profileEA.getProfileScaling_fr() - currentTotalEnergyConsumption_kWh;
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;
Expand Down Expand Up @@ -752,9 +751,9 @@ else if(gr_heatingSliders_residential.isVisible()){
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 currentTotalEnergyConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh);
totalBaseConsumption_kWh += currentTotalEnergyConsumption_kWh/profileEA.getProfileScaling_fr();
totalSavedConsumption_kWh += currentTotalEnergyConsumption_kWh/profileEA.getProfileScaling_fr() - currentTotalEnergyConsumption_kWh;
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;
Expand Down