用电峰谷比正常是多少
一般来说,用电峰谷比正常用电的价格要低20%到50%不等。具体的折扣比例要根据用电企业的用电量、用电方式和用电时间等情况来决定。
峰谷电比普通用电差多少
峰谷电比普通用电高出10-30%不等。
用电峰谷值
*
* @param price 单价
* @param peak 峰值
* @param flat 平值
* @param valley 谷值
* @param used 用量
* @return
*/
public static double getPeakValleyPrice(double price, double peak, double flat, double valley, double used) {
double peakValleyPrice;
if (used > peak) {
peakValleyPrice = (peak * price + (used peak) * price * valley) / used;
} else if (used > flat) {
peakValleyPrice = (flat * price + (used flat) * price * valley) / used;
} else {
peakValleyPrice = (used * price) / used;
}
return peakValleyPrice;
}
/**
* 计算含有峰谷平电价的电费
*
* @param peakPrice 峰价
* @param flatPrice 平价
* @param valleyPrice 谷价
* @param peak 峰电量
* @param flat 平电量
* @param valley 谷电量
* @return
*/
public static double getPeakValleyPrice(double peakPrice, double flatPrice, double valleyPrice, double peak, double flat, double valley) {
double peakValleyPrice = peak * peakPrice + flat * flatPrice + valley * valleyPrice;
return peakValleyPrice;
}
}
结果:
4.8