Example #1
0
 /// <summary>
 /// 取得电站的某年的性能
 /// </summary>
 /// <param name="plant"></param>
 /// <param name="year"></param>
 /// <param name="yearEnergy"></param>
 /// <returns>已经转化为百分率了</returns>
 public double getYearPr(Plant plant, int year, double yearEnergy)
 {
     Device device = plant.getDetectorWithRenderSunshine();
     if (device == null) return 0;
     DeviceYearData deviceYearmonth = DeviceYearDataService.GetInstance().GetDeviceYearData(device.id, year);
     float monthsunlingt = deviceYearmonth.dataValue;
     if (monthsunlingt == 0) return 0;
     float dp = plant.design_power == 0 ? 1 : plant.design_power;
     return yearEnergy / monthsunlingt * 1000 * dp;
 }
Example #2
0
 /// <summary>
 /// 取得电站的某天的性能
 /// </summary>
 /// <param name="plant"></param>
 /// <param name="year"></param>
 /// <param name="month"></param>
 /// <param name="day"></param>
 /// <param name="dayEnergy"></param>
 /// <returns>已经转化为百分率了</returns>
 public double getDayPr(Plant plant, int year, int month, int day, double dayEnergy)
 {
     Device device = plant.getDetectorWithRenderSunshine();
     if (device == null) return 0;
     DeviceMonthDayData deviceYearmonth = DeviceMonthDayDataService.GetInstance().GetDeviceMonthDayData(year, device.id, month);
     float monthsunlingt = deviceYearmonth.getDayData(day);
     if (monthsunlingt == 0) return 0;
     float dp = plant.design_power == 0 ? 1 : plant.design_power;
     return (dayEnergy / monthsunlingt * 1000 * dp) * 100;
 }
Example #3
0
 /// <summary>
 /// 取得电站的某月的性能
 /// </summary>
 /// <param name="plant"></param>
 /// <param name="year"></param>
 /// <param name="month"></param>
 /// <param name="monthEnergy"></param>
 /// <returns>已经转化为百分率了</returns>
 public double getMonthPr(Plant plant, int year, int month, double monthEnergy)
 {
     Device device = plant.getDetectorWithRenderSunshine();
     if (device == null) return 0;
     DeviceYearMonthData deviceYearmonth = DeviceYearMonthDataService.GetInstance().GetDeviceYearMonthData(device.id, year);
     float monthsunlingt = deviceYearmonth.getMonthData(month);
     if (monthsunlingt == 0) return 0;
     double? precictValue = plant.monthpredictValue(month);//发电量预测值
     if (precictValue != null)
     {
         return monthEnergy / precictValue.Value;
     }
     else
     {
         float dp = plant.design_power == 0 ? 1 : plant.design_power;
         return monthEnergy / monthsunlingt * 1000 * dp;
     }
 }