|
@@ -1,19 +1,22 @@
|
|
|
package com.gyee.runeconomy.service.Comprehensive;
|
|
|
|
|
|
+import com.gyee.common.model.StringUtils;
|
|
|
import com.gyee.common.util.DateUtils;
|
|
|
import com.gyee.runeconomy.init.CacheContext;
|
|
|
-import com.gyee.runeconomy.model.auto.ProBasicPowerstation;
|
|
|
-import com.gyee.runeconomy.model.auto.ProEconPowerstationInfoDay1;
|
|
|
-import com.gyee.runeconomy.model.auto.ProEconPowerstationInfoDay5;
|
|
|
+import com.gyee.runeconomy.model.auto.*;
|
|
|
+import com.gyee.runeconomy.service.auto.IProEconEquipmentInfoDay1Service;
|
|
|
import com.gyee.runeconomy.service.auto.IProEconPowerstationInfoDay1Service;
|
|
|
import com.gyee.runeconomy.service.auto.IProEconPowerstationInfoDay5Service;
|
|
|
+import com.gyee.runeconomy.service.auto.impl.ProEconSystemEfficiencyEquipmentServiceImpl;
|
|
|
+import com.gyee.runeconomy.service.auto.impl.ProEconSystemEfficiencyServiceImpl;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Calendar;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
public class PVSystemEfficiencyCalculator {
|
|
@@ -22,12 +25,23 @@ public class PVSystemEfficiencyCalculator {
|
|
|
@Resource
|
|
|
private IProEconPowerstationInfoDay1Service proEconPowerstationInfoDay1Service;
|
|
|
|
|
|
- public Map<String, Object> planvalue() throws Exception {
|
|
|
+ @Resource
|
|
|
+ private IProEconEquipmentInfoDay1Service proEconEquipmentInfoDay1Service;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private ProEconSystemEfficiencyServiceImpl systemEfficiencyService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private ProEconSystemEfficiencyEquipmentServiceImpl efficiencyEquipmentService;
|
|
|
+
|
|
|
+ public void planvalue() throws Exception {
|
|
|
|
|
|
String year = "2023";
|
|
|
|
|
|
int currentyear = Integer.parseInt(year);
|
|
|
+
|
|
|
int ts = 1;
|
|
|
+
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
int dqnf = cal.get(Calendar.YEAR);
|
|
|
|
|
@@ -43,6 +57,8 @@ public class PVSystemEfficiencyCalculator {
|
|
|
calendar1.set(Calendar.MILLISECOND, 0);
|
|
|
Date firstDayZeroHour = calendar1.getTime();
|
|
|
|
|
|
+
|
|
|
+ Date initialFirstDayZeroHour = (Date) firstDayZeroHour.clone();
|
|
|
|
|
|
Calendar calFirstDayZeroHour = Calendar.getInstance();
|
|
|
calFirstDayZeroHour.setTime(firstDayZeroHour);
|
|
@@ -54,12 +70,18 @@ public class PVSystemEfficiencyCalculator {
|
|
|
currentMonth = currentMonth + 1;
|
|
|
|
|
|
List<ProBasicPowerstation> wplsG = CacheContext.wplsG;
|
|
|
+ List<ProBasicProject> pjlsG = CacheContext.pjls.stream().filter(p -> p.getSpare4().equals("2")).collect(Collectors.toList());
|
|
|
+ List<ProBasicLine> lnlsG = CacheContext.lnls.stream().filter(p -> p.getSpare4().equals("2")).collect(Collectors.toList());
|
|
|
+ List<ProBasicEquipment> wtlsG = CacheContext.wtls.stream().filter(p -> p.getSpare1().equals("IN")).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
|
|
for (ProBasicPowerstation wp : wplsG) {
|
|
|
|
|
|
- for (int i = 0; i < 12; i++) {
|
|
|
+ for (int i = 0; i < currentMonth; i++) {
|
|
|
+
|
|
|
+ Date date = null;
|
|
|
+ List<ProEconSystemEfficiency> stringList = new ArrayList<>();
|
|
|
|
|
|
if (calFirstMonth == currentMonth && dqnf == currentyear) {
|
|
|
Calendar calendar5 = Calendar.getInstance();
|
|
@@ -81,6 +103,7 @@ public class PVSystemEfficiencyCalculator {
|
|
|
if (!day5List.isEmpty() && day5List != null) {
|
|
|
for (ProEconPowerstationInfoDay5 day : day5List) {
|
|
|
actualPowerOutputKilowattHours = day.getYfdldb().doubleValue();
|
|
|
+ date = day.getRecordDate();
|
|
|
}
|
|
|
}
|
|
|
if (!rzqdls.isEmpty() && rzqdls != null) {
|
|
@@ -90,54 +113,314 @@ public class PVSystemEfficiencyCalculator {
|
|
|
}
|
|
|
moduleCapacityKilowatts = wp.getJrCapacity();
|
|
|
|
|
|
- double expectedPowerOutputKilowattHours = calculateExpectedPowerOutput(solarRadiationWattsPerSquareMeter, moduleCapacityKilowatts,ts);
|
|
|
+ double expectedPowerOutputKilowattHours = calculateExpectedPowerOutput(solarRadiationWattsPerSquareMeter, moduleCapacityKilowatts, ts);
|
|
|
pr = calculatePR(actualPowerOutputKilowattHours, expectedPowerOutputKilowattHours);
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ pr = StringUtils.round(pr, 2);
|
|
|
|
|
|
- System.out.println("太阳能辐射: " + solarRadiationWattsPerSquareMeter + " W/m²");
|
|
|
- System.out.println("实际发电量: " + actualPowerOutputKilowattHours + " kWh");
|
|
|
- System.out.println("光伏模块额定容量: " + moduleCapacityKilowatts + " kW");
|
|
|
- System.out.println("预期发电量: " + expectedPowerOutputKilowattHours + " kWh");
|
|
|
- System.out.println("光伏系统效率 (PR): " + pr + "%");
|
|
|
+ solarRadiationWattsPerSquareMeter = StringUtils.round(solarRadiationWattsPerSquareMeter, 2);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ ProEconSystemEfficiency power = new ProEconSystemEfficiency();
|
|
|
+ power.setId(StringUtils.getUUID());
|
|
|
+ power.setForeignKeyId(wp.getId());
|
|
|
+ power.setStationId(wp.getId());
|
|
|
+ power.setLocation("wp");
|
|
|
+ power.setDataDate(date);
|
|
|
+ power.setRzqd(solarRadiationWattsPerSquareMeter);
|
|
|
+ power.setEfficiency(pr);
|
|
|
+ stringList.add(power);
|
|
|
+ systemEfficiencyService.batchAdd(stringList);
|
|
|
|
|
|
firstDayZeroHour = DateUtils.addMonths(firstDayZeroHour, 1);
|
|
|
calFirstDayZeroHour.setTime(firstDayZeroHour);
|
|
|
calFirstMonth = calFirstDayZeroHour.get(Calendar.MONTH) + 1;
|
|
|
ts = calFirstDayZeroHour.getActualMaximum(Calendar.DAY_OF_MONTH);
|
|
|
}
|
|
|
+
|
|
|
+ firstDayZeroHour = initialFirstDayZeroHour;
|
|
|
}
|
|
|
- return null;
|
|
|
+
|
|
|
+
|
|
|
+ int ts2 = 1;
|
|
|
+
|
|
|
+ Calendar calendar2 = Calendar.getInstance();
|
|
|
+ calendar2.setTime(new Date());
|
|
|
+ calendar2.set(Calendar.YEAR, currentyear);
|
|
|
+ calendar2.set(Calendar.MONTH, Calendar.JANUARY);
|
|
|
+ calendar2.set(Calendar.DAY_OF_MONTH, 1);
|
|
|
+ calendar2.set(Calendar.HOUR_OF_DAY, 0);
|
|
|
+ calendar2.set(Calendar.MINUTE, 0);
|
|
|
+ calendar2.set(Calendar.SECOND, 0);
|
|
|
+ calendar2.set(Calendar.MILLISECOND, 0);
|
|
|
+ Date firstDayZeroHour2 = calendar2.getTime();
|
|
|
+
|
|
|
+
|
|
|
+ Date initialFirstDayZeroHour2 = (Date) firstDayZeroHour2.clone();
|
|
|
+
|
|
|
+
|
|
|
+ Calendar calFirstDayZeroHour2 = Calendar.getInstance();
|
|
|
+ calFirstDayZeroHour2.setTime(firstDayZeroHour2);
|
|
|
+ int calFirstMonth2 = calFirstDayZeroHour2.get(Calendar.MONTH) + 1;
|
|
|
+
|
|
|
+ for (ProBasicProject pj : pjlsG) {
|
|
|
+ for (int i = 0; i < currentMonth; i++) {
|
|
|
+ Date date = null;
|
|
|
+ List<ProEconSystemEfficiency> stringList = new ArrayList<>();
|
|
|
+
|
|
|
+ if (calFirstMonth2 == currentMonth && dqnf == currentyear) {
|
|
|
+ Calendar calendar5 = Calendar.getInstance();
|
|
|
+ ts2 = calendar5.get(Calendar.DAY_OF_MONTH);
|
|
|
+ } else {
|
|
|
+
|
|
|
+ ts2 = calFirstDayZeroHour2.getActualMaximum(Calendar.DAY_OF_MONTH);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ProEconPowerstationInfoDay5> day5List = proEconPowerstationInfoDay5Service.getmax(pj.getId(), firstDayZeroHour2);
|
|
|
+ List<ProEconPowerstationInfoDay1> rzqdls = proEconPowerstationInfoDay1Service.getmax(pj.getId(), firstDayZeroHour2);
|
|
|
+
|
|
|
+ double solarRadiationWattsPerSquareMeter = 0.0;
|
|
|
+ double actualPowerOutputKilowattHours = 0.0;
|
|
|
+ double moduleCapacityKilowatts = 0.0;
|
|
|
+ double pr = 0.0;
|
|
|
+
|
|
|
+ if (!day5List.isEmpty() && day5List != null) {
|
|
|
+ for (ProEconPowerstationInfoDay5 day : day5List) {
|
|
|
+ actualPowerOutputKilowattHours = day.getYfdldb().doubleValue();
|
|
|
+ date = day.getRecordDate();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!rzqdls.isEmpty() && rzqdls != null) {
|
|
|
+ for (ProEconPowerstationInfoDay1 rz : rzqdls) {
|
|
|
+ solarRadiationWattsPerSquareMeter = rz.getYpjfs().doubleValue();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ moduleCapacityKilowatts = pj.getCapacity();
|
|
|
+
|
|
|
+ double expectedPowerOutputKilowattHours = calculateExpectedPowerOutput(solarRadiationWattsPerSquareMeter, moduleCapacityKilowatts, ts2);
|
|
|
+ pr = calculatePR(actualPowerOutputKilowattHours, expectedPowerOutputKilowattHours);
|
|
|
+
|
|
|
+ pr = StringUtils.round(pr, 2);
|
|
|
+ solarRadiationWattsPerSquareMeter = StringUtils.round(solarRadiationWattsPerSquareMeter, 2);
|
|
|
+
|
|
|
+
|
|
|
+ ProEconSystemEfficiency power = new ProEconSystemEfficiency();
|
|
|
+ power.setId(StringUtils.getUUID());
|
|
|
+ power.setForeignKeyId(pj.getId());
|
|
|
+ power.setStationId(pj.getWindpowerstationId());
|
|
|
+ power.setLocation("pj");
|
|
|
+ power.setDataDate(date);
|
|
|
+ power.setRzqd(solarRadiationWattsPerSquareMeter);
|
|
|
+ power.setEfficiency(pr);
|
|
|
+ stringList.add(power);
|
|
|
+ systemEfficiencyService.batchAdd(stringList);
|
|
|
+
|
|
|
+
|
|
|
+ firstDayZeroHour2 = DateUtils.addMonths(firstDayZeroHour2, 1);
|
|
|
+ calFirstDayZeroHour2.setTime(firstDayZeroHour2);
|
|
|
+ calFirstMonth2 = calFirstDayZeroHour2.get(Calendar.MONTH) + 1;
|
|
|
+ ts2 = calFirstDayZeroHour2.getActualMaximum(Calendar.DAY_OF_MONTH);
|
|
|
+ }
|
|
|
+
|
|
|
+ firstDayZeroHour2 = initialFirstDayZeroHour2;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ int ts3 = 1;
|
|
|
+
|
|
|
+ Calendar calendar3 = Calendar.getInstance();
|
|
|
+ calendar3.setTime(new Date());
|
|
|
+ calendar3.set(Calendar.YEAR, currentyear);
|
|
|
+ calendar3.set(Calendar.MONTH, Calendar.JANUARY);
|
|
|
+ calendar3.set(Calendar.DAY_OF_MONTH, 1);
|
|
|
+ calendar3.set(Calendar.HOUR_OF_DAY, 0);
|
|
|
+ calendar3.set(Calendar.MINUTE, 0);
|
|
|
+ calendar3.set(Calendar.SECOND, 0);
|
|
|
+ calendar3.set(Calendar.MILLISECOND, 0);
|
|
|
+ Date firstDayZeroHour3 = calendar3.getTime();
|
|
|
+
|
|
|
+
|
|
|
+ Date initialFirstDayZeroHour3 = (Date) firstDayZeroHour3.clone();
|
|
|
+
|
|
|
+
|
|
|
+ Calendar calFirstDayZeroHour3 = Calendar.getInstance();
|
|
|
+ calFirstDayZeroHour3.setTime(firstDayZeroHour3);
|
|
|
+ int calFirstMonth3 = calFirstDayZeroHour3.get(Calendar.MONTH) + 1;
|
|
|
+
|
|
|
+ for (ProBasicLine ln : lnlsG) {
|
|
|
+ List<ProBasicProject> wpid = pjlsG.stream().filter(l->l.getId().equals(ln.getProjectId())).collect(Collectors.toList());
|
|
|
+ for (int i = 0; i < currentMonth; i++) {
|
|
|
+ Date date = null;
|
|
|
+ List<ProEconSystemEfficiency> stringList = new ArrayList<>();
|
|
|
+
|
|
|
+ if (calFirstMonth3 == currentMonth && dqnf == currentyear) {
|
|
|
+ Calendar calendar5 = Calendar.getInstance();
|
|
|
+ ts3 = calendar5.get(Calendar.DAY_OF_MONTH);
|
|
|
+ } else {
|
|
|
+
|
|
|
+ ts3 = calFirstDayZeroHour3.getActualMaximum(Calendar.DAY_OF_MONTH);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ProEconPowerstationInfoDay5> day5List = proEconPowerstationInfoDay5Service.getmax(ln.getId(), firstDayZeroHour3);
|
|
|
+ List<ProEconPowerstationInfoDay1> rzqdls = proEconPowerstationInfoDay1Service.getmax(ln.getId(), firstDayZeroHour3);
|
|
|
+
|
|
|
+ double solarRadiationWattsPerSquareMeter = 0.0;
|
|
|
+ double actualPowerOutputKilowattHours = 0.0;
|
|
|
+ double moduleCapacityKilowatts = 0.0;
|
|
|
+ double pr = 0.0;
|
|
|
+
|
|
|
+ if (!day5List.isEmpty() && day5List != null) {
|
|
|
+ for (ProEconPowerstationInfoDay5 day : day5List) {
|
|
|
+ actualPowerOutputKilowattHours = day.getYfdldb().doubleValue();
|
|
|
+ date = day.getRecordDate();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!rzqdls.isEmpty() && rzqdls != null) {
|
|
|
+ for (ProEconPowerstationInfoDay1 rz : rzqdls) {
|
|
|
+ solarRadiationWattsPerSquareMeter = rz.getYpjfs().doubleValue();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ moduleCapacityKilowatts = ln.getCapacity();
|
|
|
+
|
|
|
+ double expectedPowerOutputKilowattHours = calculateExpectedPowerOutput(solarRadiationWattsPerSquareMeter, moduleCapacityKilowatts, ts3);
|
|
|
+ pr = calculatePR(actualPowerOutputKilowattHours, expectedPowerOutputKilowattHours);
|
|
|
+
|
|
|
+ pr = StringUtils.round(pr, 2);
|
|
|
+ solarRadiationWattsPerSquareMeter = StringUtils.round(solarRadiationWattsPerSquareMeter, 2);
|
|
|
+
|
|
|
+
|
|
|
+ ProEconSystemEfficiency power = new ProEconSystemEfficiency();
|
|
|
+ power.setId(StringUtils.getUUID());
|
|
|
+ power.setForeignKeyId(ln.getId());
|
|
|
+ power.setStationId(wpid.get(0).getWindpowerstationId());
|
|
|
+ power.setProjectId(wpid.get(0).getId());
|
|
|
+ power.setLineId(ln.getId());
|
|
|
+ power.setLocation("ln");
|
|
|
+ power.setDataDate(date);
|
|
|
+ power.setRzqd(solarRadiationWattsPerSquareMeter);
|
|
|
+ power.setEfficiency(pr);
|
|
|
+ stringList.add(power);
|
|
|
+ if (date!=null) {
|
|
|
+ systemEfficiencyService.batchAdd(stringList);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ firstDayZeroHour3 = DateUtils.addMonths(firstDayZeroHour3, 1);
|
|
|
+ calFirstDayZeroHour3.setTime(firstDayZeroHour3);
|
|
|
+ calFirstMonth3 = calFirstDayZeroHour3.get(Calendar.MONTH) + 1;
|
|
|
+ ts3 = calFirstDayZeroHour3.getActualMaximum(Calendar.DAY_OF_MONTH);
|
|
|
+ }
|
|
|
+
|
|
|
+ firstDayZeroHour3 = initialFirstDayZeroHour3;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ int ts4 = 1;
|
|
|
+
|
|
|
+ Calendar calendar4 = Calendar.getInstance();
|
|
|
+ calendar4.setTime(new Date());
|
|
|
+ calendar4.set(Calendar.YEAR, currentyear);
|
|
|
+ calendar4.set(Calendar.MONTH, Calendar.JANUARY);
|
|
|
+ calendar4.set(Calendar.DAY_OF_MONTH, 1);
|
|
|
+ calendar4.set(Calendar.HOUR_OF_DAY, 0);
|
|
|
+ calendar4.set(Calendar.MINUTE, 0);
|
|
|
+ calendar4.set(Calendar.SECOND, 0);
|
|
|
+ calendar4.set(Calendar.MILLISECOND, 0);
|
|
|
+ Date firstDayZeroHour4 = calendar4.getTime();
|
|
|
+
|
|
|
+
|
|
|
+ Date initialFirstDayZeroHour4 = (Date) firstDayZeroHour4.clone();
|
|
|
+
|
|
|
+
|
|
|
+ Calendar calFirstDayZeroHour4 = Calendar.getInstance();
|
|
|
+ calFirstDayZeroHour4.setTime(firstDayZeroHour4);
|
|
|
+ int calFirstMonth4 = calFirstDayZeroHour4.get(Calendar.MONTH) + 1;
|
|
|
+
|
|
|
+ for (ProBasicEquipment wt : wtlsG) {
|
|
|
+
|
|
|
+ List<ProEconEquipmentmodel> collect = CacheContext.equipmentmodels.stream().filter(w -> wt.getModelId().equals(w.getId())).collect(Collectors.toList());
|
|
|
+
|
|
|
+ for (int i = 0; i < currentMonth; i++) {
|
|
|
+ Date date = null;
|
|
|
+ List<ProEconSystemEfficiencyEquipment> stringList = new ArrayList<>();
|
|
|
+
|
|
|
+ if (calFirstMonth4 == currentMonth && dqnf == currentyear) {
|
|
|
+ Calendar calendar5 = Calendar.getInstance();
|
|
|
+ ts4 = calendar5.get(Calendar.DAY_OF_MONTH);
|
|
|
+ } else {
|
|
|
+
|
|
|
+ ts4 = calFirstDayZeroHour4.getActualMaximum(Calendar.DAY_OF_MONTH);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ProEconEquipmentInfoDay1> rzqdls = proEconEquipmentInfoDay1Service.getmax(wt.getId(), firstDayZeroHour4);
|
|
|
+
|
|
|
+ double solarRadiationWattsPerSquareMeter = 0.0;
|
|
|
+ double actualPowerOutputKilowattHours = 0.0;
|
|
|
+ double moduleCapacityKilowatts = 0.0;
|
|
|
+ double pr = 0.0;
|
|
|
+
|
|
|
+ if (!rzqdls.isEmpty() && rzqdls != null) {
|
|
|
+ for (ProEconEquipmentInfoDay1 day : rzqdls) {
|
|
|
+ actualPowerOutputKilowattHours = day.getYfdl().doubleValue();
|
|
|
+ solarRadiationWattsPerSquareMeter = day.getYpjfs().doubleValue();
|
|
|
+ date = day.getRecordDate();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ moduleCapacityKilowatts = collect.get(0).getPowerProduction();
|
|
|
+
|
|
|
+ double expectedPowerOutputKilowattHours = calculateExpectedPowerOutput(solarRadiationWattsPerSquareMeter, moduleCapacityKilowatts, ts4);
|
|
|
+ pr = calculatePR(actualPowerOutputKilowattHours, expectedPowerOutputKilowattHours);
|
|
|
+
|
|
|
+ pr = StringUtils.round(pr, 2);
|
|
|
+ solarRadiationWattsPerSquareMeter = StringUtils.round(solarRadiationWattsPerSquareMeter, 2);
|
|
|
+
|
|
|
+
|
|
|
+ ProEconSystemEfficiencyEquipment power = new ProEconSystemEfficiencyEquipment();
|
|
|
+ power.setId(StringUtils.getUUID());
|
|
|
+ power.setForeignKeyId(wt.getId());
|
|
|
+ power.setStationId(wt.getWindpowerstationId());
|
|
|
+ power.setProjectId(wt.getProjectId());
|
|
|
+ power.setLineId(wt.getLineId());
|
|
|
+ power.setEquipmentId(wt.getId());
|
|
|
+ power.setLocation("wt");
|
|
|
+ power.setDataDate(date);
|
|
|
+ power.setRzqd(solarRadiationWattsPerSquareMeter);
|
|
|
+ power.setEfficiency(pr);
|
|
|
+ stringList.add(power);
|
|
|
+ if (date!=null) {
|
|
|
+ efficiencyEquipmentService.batchAdd(stringList);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ firstDayZeroHour4 = DateUtils.addMonths(firstDayZeroHour4, 1);
|
|
|
+ calFirstDayZeroHour4.setTime(firstDayZeroHour4);
|
|
|
+ calFirstMonth4 = calFirstDayZeroHour4.get(Calendar.MONTH) + 1;
|
|
|
+ ts4 = calFirstDayZeroHour4.getActualMaximum(Calendar.DAY_OF_MONTH);
|
|
|
+ }
|
|
|
+
|
|
|
+ firstDayZeroHour4 = initialFirstDayZeroHour4;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- public static double calculateExpectedPowerOutput(double solarRadiationWattsPerSquareMeter, double moduleCapacityKilowatts,double ts) {
|
|
|
+
|
|
|
+ public static double calculateExpectedPowerOutput(double solarRadiationWattsPerSquareMeter, double moduleCapacityKilowatts, double ts) {
|
|
|
double hoursOfDaylight = 12.0;
|
|
|
|
|
|
|
|
@@ -146,10 +429,10 @@ public class PVSystemEfficiencyCalculator {
|
|
|
|
|
|
|
|
|
public static double calculatePR(double actualPowerOutputKilowattHours, double expectedPowerOutputKilowattHours) {
|
|
|
- if (expectedPowerOutputKilowattHours == 0){
|
|
|
- expectedPowerOutputKilowattHours = 1;
|
|
|
+ if (expectedPowerOutputKilowattHours == 0) {
|
|
|
+ return actualPowerOutputKilowattHours;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return (actualPowerOutputKilowattHours / expectedPowerOutputKilowattHours) * 100;
|
|
|
}
|
|
|
}
|