增加了更丰富飞信息。
This commit is contained in:
22
main.py
22
main.py
@@ -194,6 +194,28 @@ def plot_system_curves(solar_output, wind_output, thermal_output, load_demand, r
|
||||
print(f"净购电量: {-total_grid_feed_in:.2f} MWh")
|
||||
print(f"总购电量: {total_grid_purchase:.2f} MWh")
|
||||
print(f"总上网电量: {total_grid_feed_out:.2f} MWh")
|
||||
|
||||
# 计算新能源统计信息
|
||||
total_solar_potential = sum(solar_output)
|
||||
total_wind_potential = sum(wind_output)
|
||||
total_renewable_potential = total_solar_potential + total_wind_potential
|
||||
total_renewable_actual = total_solar_potential - total_curtail_solar + total_wind_potential - total_curtail_wind
|
||||
|
||||
# 新能源利用率 = 实际发电量 / 潜在发电量
|
||||
renewable_utilization_rate = (total_renewable_actual / total_renewable_potential * 100) if total_renewable_potential > 0 else 0
|
||||
|
||||
# 新能源消纳电量占比 = 新能源实际发电量 / 总负荷
|
||||
renewable_consumption_ratio = (total_renewable_actual / sum(load_demand) * 100) if sum(load_demand) > 0 else 0
|
||||
|
||||
print(f"\n=== 新能源统计 ===")
|
||||
print(f"新能源潜在发电量: {total_renewable_potential:.2f} MWh")
|
||||
print(f" - 光伏潜在发电量: {total_solar_potential:.2f} MWh")
|
||||
print(f" - 风电潜在发电量: {total_wind_potential:.2f} MWh")
|
||||
print(f"新能源实际发电量: {total_renewable_actual:.2f} MWh")
|
||||
print(f" - 光伏实际发电量: {total_solar_potential - total_curtail_solar:.2f} MWh")
|
||||
print(f" - 风电实际发电量: {total_wind_potential - total_curtail_wind:.2f} MWh")
|
||||
print(f"新能源利用率: {renewable_utilization_rate:.2f}%")
|
||||
print(f"新能源消纳电量占比: {renewable_consumption_ratio:.2f}%")
|
||||
|
||||
|
||||
def export_results_to_excel(solar_output, wind_output, thermal_output, load_demand, result, params, filename=None):
|
||||
|
||||
Reference in New Issue
Block a user