You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
3.7 KiB
96 lines
3.7 KiB
package com.dky.calculate;
|
|
|
|
|
|
import com.dky.utils.enums.EnergyPriceType;
|
|
|
|
public class BuildHeatingModel {
|
|
|
|
// 定义常量
|
|
private static final double COAL_PRICE_PER_KILOGRAM = 0.9; // 煤炭的平均价格,单位:元/千克
|
|
private static final double STANDARD_COAL_CONVERSION_FACTOR = 0.7143; // 千克标准煤/千克
|
|
private static final double CO2_CONVERSION_FACTOR = 1.9003; // 千克二氧化碳/千克
|
|
private static final double ELECTRICITY_SUBSTITUTION_CONVERSION_FACTOR = 0.1229; // 千克标准煤/千瓦时
|
|
|
|
/**
|
|
* 初次投资费用(万元)
|
|
* @param floor 建筑面积
|
|
* @param heatArea 单台电设备参考的可供暖面积
|
|
* @param devPrice 单台电设备价格
|
|
* @return
|
|
*/
|
|
public Double investment(Double floor,
|
|
Double heatArea,
|
|
Double devPrice){
|
|
int remainder = (int)(floor/heatArea) + (floor%heatArea==0?0:1);
|
|
return remainder * devPrice;
|
|
}
|
|
|
|
/**
|
|
* 年运行费用(元)
|
|
* @param deviceNum 电锅炉设备台数
|
|
* @param devicePower 单台电锅炉的功率
|
|
* @param days 年采暖(供冷)时间(天)
|
|
* @param laborCost 电替代设备人工费用成本
|
|
* @return
|
|
*/
|
|
public static Double getRunCost(Integer deviceNum,
|
|
Double devicePower,
|
|
Integer days,
|
|
Double laborCost){
|
|
return (deviceNum * devicePower * days * 24 * EnergyPriceType.Residential_Electric_Price.getPrice()) + (laborCost * deviceNum);
|
|
}
|
|
|
|
/**
|
|
* 年总费用(元)
|
|
* @param deviceNum 电锅炉设备台数
|
|
* @param devicePrice 单台电设备价格 非表中参数
|
|
* @param useYears 使用年限 非表中参数
|
|
* @param devicePower 单台电锅炉的功率 非表中参数
|
|
* @param days 年采暖(供冷)时间(天) 基础入参
|
|
* @param laborCost 电替代设备人工费用成本 非表中参数
|
|
* @return
|
|
*/
|
|
public static Double getYearCost(Integer deviceNum,
|
|
Double devicePrice,
|
|
Integer useYears,
|
|
Double devicePower,
|
|
Integer days,
|
|
Double laborCost){
|
|
double run = (deviceNum * devicePower * days * 24 * EnergyPriceType.Residential_Electric_Price.getPrice()) + (laborCost * deviceNum);
|
|
return ((deviceNum * devicePrice) / useYears) + run;
|
|
}
|
|
|
|
/**
|
|
* 年减碳
|
|
* @param lastYearFee 上年运行费用
|
|
* @param oldLaborCost 原设备的人工费用
|
|
* @param electricCost 电替代设备年耗电量
|
|
* @return
|
|
*/
|
|
public static Double calculateAnnualCarbonReduction(Double lastYearFee,
|
|
Double oldLaborCost,
|
|
Double electricCost){
|
|
// 计算煤炭减少的碳排放量
|
|
double coalReduction = (lastYearFee - oldLaborCost) / COAL_PRICE_PER_KILOGRAM * STANDARD_COAL_CONVERSION_FACTOR;
|
|
|
|
// 计算电替代设备增加的碳排放量
|
|
double electricityIncrease = electricCost * ELECTRICITY_SUBSTITUTION_CONVERSION_FACTOR;
|
|
|
|
// 计算总的年减碳量
|
|
return (coalReduction - electricityIncrease) * CO2_CONVERSION_FACTOR;
|
|
}
|
|
|
|
|
|
/**
|
|
* 替代电量(千瓦时)
|
|
* @param deviceNum 电锅炉设备台数
|
|
* @param devicePower 单台电锅炉的功率
|
|
* @param days 年采暖(供冷)时间(天)
|
|
* @return
|
|
*/
|
|
public static Double getElectric(Integer deviceNum,
|
|
Double devicePower,
|
|
Integer days){
|
|
return deviceNum * devicePower * days * 24 ;
|
|
}
|
|
}
|
|
|