以最小弃电量为目标配置储能。

This commit is contained in:
dmy
2025-12-27 12:51:42 +08:00
parent 164b9da026
commit 25fc0b33aa
2 changed files with 140 additions and 51 deletions

View File

@@ -641,6 +641,14 @@ def main():
result = optimize_storage_capacity(
solar_output, wind_output, thermal_output, load_demand, params
)
# 显示优化结果摘要
print("\n=== 优化结果摘要 ===")
print(f"优化目标: 最小化弃电量")
print(f"所选储能容量: {result['required_storage_capacity']:.2f} MWh")
if result.get('total_curtailed_energy') is not None:
print(f"总弃电量: {result['total_curtailed_energy']:.2f} MWh")
print(f"储能容量上限: {result.get('max_storage_limit', '无限制')}")
# 绘制曲线
print("正在绘制系统运行曲线...")