|
|
|
package com.dky.calculate;
|
|
|
|
|
|
|
|
import com.dky.entity.Heatboiler;
|
|
|
|
import com.dky.entity.HeatboilerSpec;
|
|
|
|
import com.dky.entity.OriginalDevice;
|
|
|
|
import com.dky.utils.entity.DevSpec;
|
|
|
|
|
|
|
|
public class HeatBoilerModel {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 计算初次投资费用
|
|
|
|
* @param heatboilerSpec 非表中参数
|
|
|
|
* @param heatboiler 基础入参
|
|
|
|
* @param originalDevice 原设备参数
|
|
|
|
* @param d 热效率,后期从设备中获取 TODO
|
|
|
|
* @return 初次投资费用
|
|
|
|
*/
|
|
|
|
public static double calculateInitialInvestment(HeatboilerSpec heatboilerSpec, Heatboiler heatboiler , OriginalDevice originalDevice,Double d) {
|
|
|
|
|
|
|
|
// 计算电替代设备台数 = 供热设备功率(蒸吨)/(电替代设备功率<A>*热效率)
|
|
|
|
double substituteElectricityDevices = heatboiler.getHotDevicePower() / (heatboiler.getHotDevicePower() * d);
|
|
|
|
|
|
|
|
// 计算初次投资费用
|
|
|
|
return substituteElectricityDevices * heatboilerSpec.getDevModel();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 计算年运行费用
|
|
|
|
* @param heatboilerSpec 非表中参数
|
|
|
|
* @param heatboiler 基础入参
|
|
|
|
* @param originalDevice 原设备参数
|
|
|
|
* @param count 电替代设备台数 TODO
|
|
|
|
* @return 年运行费用
|
|
|
|
*/
|
|
|
|
public static double calculateAnnualOperatingCost(HeatboilerSpec heatboilerSpec, Heatboiler heatboiler , OriginalDevice originalDevice ,Integer count) {
|
|
|
|
|
|
|
|
// 电替代设备年耗电量=单台电替代设备的功率<A>*电替代设备台数*电设备年运行时间<B>
|
|
|
|
double annualElectricityConsumption = heatboilerSpec.getSubstitutePower() * count * heatboilerSpec.getAnnualOperationTime();
|
|
|
|
// 年运行费用=电替代设备年耗电量*平均电价(0.5元/千瓦时)+电替代设备人工费用成本<A>
|
|
|
|
return annualElectricityConsumption * 0.5 + heatboilerSpec.getSubstituteLaborCost();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 计算年总费用
|
|
|
|
* @param heatboilerSpec 非表中参数
|
|
|
|
* @param heatboiler 基础入参
|
|
|
|
* @param originalDevice 原设备参数
|
|
|
|
* @param count 电替代设备台数 TODO
|
|
|
|
* @return 年总费用
|
|
|
|
*/
|
|
|
|
public static double calculateAnnualTotalCost(HeatboilerSpec heatboilerSpec, Heatboiler heatboiler , OriginalDevice originalDevice ,Integer count) {
|
|
|
|
//(电替代设备台数*单台电设备价格<A>)/电替代设备的使用年限<A>+年运行费用
|
|
|
|
return (count * heatboilerSpec.getDevModel()) / heatboilerSpec.getServiceLife() + calculateAnnualOperatingCost( heatboilerSpec, heatboiler , originalDevice,count);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 计算年减碳量
|
|
|
|
* @param heatboilerSpec 非表中参数
|
|
|
|
* @param heatboiler 基础入参
|
|
|
|
* @param originalDevice 原设备参数
|
|
|
|
* @return 年减碳量
|
|
|
|
*/
|
|
|
|
public static double calculateAnnualCarbonReduction(HeatboilerSpec heatboilerSpec, Heatboiler heatboiler , OriginalDevice originalDevice) {
|
|
|
|
|
|
|
|
//年减碳量=(替代前年能源用量*0.7143千克标准煤/千克-电替代设备年耗电量*0.1229千克标准煤/千瓦时)*1.9003千克二氧化碳/千克
|
|
|
|
final double standardCoalCoefficient = 0.7143; // 千克标准煤/千克
|
|
|
|
final double electricityConsumptionCoefficient = 0.1229; // 千克标准煤/千瓦时
|
|
|
|
final double carbonDioxideCoefficient = 1.9003; // 千克二氧化碳/千克
|
|
|
|
|
|
|
|
//单台电替代设备年耗电量 = 电替代设备年运行时间 * 电替代设备功率
|
|
|
|
double electricSubstitutionEquipmentYearlyElectricityConsumption = heatboilerSpec.getAnnualOperationTime() * heatboilerSpec.getSubstitutePower();
|
|
|
|
|
|
|
|
return (originalDevice.getSubstituteBeforeEnergyConsumption() * standardCoalCoefficient
|
|
|
|
- electricSubstitutionEquipmentYearlyElectricityConsumption * electricityConsumptionCoefficient)
|
|
|
|
* carbonDioxideCoefficient;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 计算替代电量
|
|
|
|
* @param heatboilerSpec 非表中参数
|
|
|
|
* @param heatboiler 基础入参
|
|
|
|
* @param originalDevice 原设备参数
|
|
|
|
* @param count 电替代设备台数 TODO
|
|
|
|
* @return 替代电量
|
|
|
|
*/
|
|
|
|
public static double calculateSubstituteElectricity(HeatboilerSpec heatboilerSpec, Heatboiler heatboiler , OriginalDevice originalDevice,Integer count) {
|
|
|
|
// 电替代设备年耗电量=电替代设备的功率<A>*电替代设备台数*电设备年运行时间<B>
|
|
|
|
return heatboilerSpec.getSubstitutePower() * count * heatboilerSpec.getAnnualOperationTime();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 计算运行收益
|
|
|
|
* @param heatboilerSpec 非表中参数
|
|
|
|
* @param heatboiler 基础入参
|
|
|
|
* @param originalDevice 原设备参数
|
|
|
|
* @param currentYearOperatingCost 年运行费用 TODO
|
|
|
|
* @return 运行收益
|
|
|
|
*/
|
|
|
|
public static double calculateOperatingIncome(HeatboilerSpec heatboilerSpec, Heatboiler heatboiler , OriginalDevice originalDevice,Double currentYearOperatingCost) {
|
|
|
|
//运行收益=年运行费用-上年运行费用(即原设备运行费用)
|
|
|
|
return currentYearOperatingCost - originalDevice.getLastYearFee();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 计算投资回收期
|
|
|
|
* @param heatboilerSpec 非表中参数
|
|
|
|
* @param heatboiler 基础入参
|
|
|
|
* @param originalDevice 原设备参数
|
|
|
|
* @param d 热效率,后期从设备中获取 TODO
|
|
|
|
* @param currentYearOperatingCost 年运行费用 TODO
|
|
|
|
* @return 投资回收期
|
|
|
|
*/
|
|
|
|
public static double calculatePaybackPeriod(HeatboilerSpec heatboilerSpec, Heatboiler heatboiler , OriginalDevice originalDevice,Double currentYearOperatingCost,Double d) {
|
|
|
|
return calculateInitialInvestment( heatboilerSpec, heatboiler , originalDevice,d)/calculateOperatingIncome( heatboilerSpec, heatboiler , originalDevice,currentYearOperatingCost);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|