修复可用电量计算。
This commit is contained in:
58
main.py
58
main.py
@@ -287,7 +287,13 @@ def export_results_to_excel(solar_output, wind_output, thermal_output, load_dema
|
||||
'储能效率',
|
||||
'放电倍率',
|
||||
'充电倍率',
|
||||
'最大储能容量'
|
||||
'最大储能容量',
|
||||
'额定火电装机容量',
|
||||
'额定光伏装机容量',
|
||||
'额定风电装机容量',
|
||||
'火电可用发电量',
|
||||
'光伏可用发电量',
|
||||
'风电可用发电量'
|
||||
],
|
||||
'参数值': [
|
||||
params.max_curtailment_wind,
|
||||
@@ -296,7 +302,13 @@ def export_results_to_excel(solar_output, wind_output, thermal_output, load_dema
|
||||
params.storage_efficiency,
|
||||
params.discharge_rate,
|
||||
params.charge_rate,
|
||||
params.max_storage_capacity if params.max_storage_capacity is not None else "无限制"
|
||||
params.max_storage_capacity if params.max_storage_capacity is not None else "无限制",
|
||||
params.rated_thermal_capacity,
|
||||
params.rated_solar_capacity,
|
||||
params.rated_wind_capacity,
|
||||
params.available_thermal_energy,
|
||||
params.available_solar_energy,
|
||||
params.available_wind_energy
|
||||
],
|
||||
'单位': [
|
||||
"比例",
|
||||
@@ -305,6 +317,12 @@ def export_results_to_excel(solar_output, wind_output, thermal_output, load_dema
|
||||
"效率",
|
||||
"C-rate",
|
||||
"C-rate",
|
||||
"MWh",
|
||||
"MW",
|
||||
"MW",
|
||||
"MW",
|
||||
"MWh",
|
||||
"MWh",
|
||||
"MWh"
|
||||
]
|
||||
})
|
||||
@@ -427,6 +445,12 @@ def main():
|
||||
print(f" 放电倍率: {params.discharge_rate}")
|
||||
print(f" 充电倍率: {params.charge_rate}")
|
||||
print(f" 最大储能容量: {params.max_storage_capacity}")
|
||||
print(f" 额定火电装机容量: {params.rated_thermal_capacity} MW")
|
||||
print(f" 额定光伏装机容量: {params.rated_solar_capacity} MW")
|
||||
print(f" 额定风电装机容量: {params.rated_wind_capacity} MW")
|
||||
print(f" 火电可用发电量: {params.available_thermal_energy} MWh")
|
||||
print(f" 光伏可用发电量: {params.available_solar_energy} MWh")
|
||||
print(f" 风电可用发电量: {params.available_wind_energy} MWh")
|
||||
else:
|
||||
print("\n警告:未找到系统参数,使用默认参数")
|
||||
params = SystemParameters(
|
||||
@@ -435,7 +459,13 @@ def main():
|
||||
max_grid_ratio=0.2,
|
||||
storage_efficiency=0.9,
|
||||
discharge_rate=1.0,
|
||||
charge_rate=1.0
|
||||
charge_rate=1.0,
|
||||
rated_thermal_capacity=100.0,
|
||||
rated_solar_capacity=100.0,
|
||||
rated_wind_capacity=100.0,
|
||||
available_thermal_energy=2400.0,
|
||||
available_solar_energy=600.0,
|
||||
available_wind_energy=1200.0
|
||||
)
|
||||
|
||||
# 显示数据统计
|
||||
@@ -474,7 +504,13 @@ def main():
|
||||
max_grid_ratio=0.2,
|
||||
storage_efficiency=0.9,
|
||||
discharge_rate=1.0,
|
||||
charge_rate=1.0
|
||||
charge_rate=1.0,
|
||||
rated_thermal_capacity=100.0,
|
||||
rated_solar_capacity=100.0,
|
||||
rated_wind_capacity=100.0,
|
||||
available_thermal_energy=2400.0,
|
||||
available_solar_energy=600.0,
|
||||
available_wind_energy=1200.0
|
||||
)
|
||||
|
||||
# 对于 --yearly 参数,也需要设置默认参数
|
||||
@@ -485,7 +521,13 @@ def main():
|
||||
max_grid_ratio=0.2,
|
||||
storage_efficiency=0.9,
|
||||
discharge_rate=1.0,
|
||||
charge_rate=1.0
|
||||
charge_rate=1.0,
|
||||
rated_thermal_capacity=100.0,
|
||||
rated_solar_capacity=100.0,
|
||||
rated_wind_capacity=100.0,
|
||||
available_thermal_energy=2400.0,
|
||||
available_solar_energy=600.0,
|
||||
available_wind_energy=1200.0
|
||||
)
|
||||
|
||||
# 显示当前使用的系统参数
|
||||
@@ -497,6 +539,12 @@ def main():
|
||||
print(f"放电倍率: {params.discharge_rate}")
|
||||
print(f"充电倍率: {params.charge_rate}")
|
||||
print(f"最大储能容量: {params.max_storage_capacity if params.max_storage_capacity is not None else '无限制'}")
|
||||
print(f"额定火电装机容量: {params.rated_thermal_capacity} MW")
|
||||
print(f"额定光伏装机容量: {params.rated_solar_capacity} MW")
|
||||
print(f"额定风电装机容量: {params.rated_wind_capacity} MW")
|
||||
print(f"火电可用发电量: {params.available_thermal_energy} MWh")
|
||||
print(f"光伏可用发电量: {params.available_solar_energy} MWh")
|
||||
print(f"风电可用发电量: {params.available_wind_energy} MWh")
|
||||
print("=" * 40)
|
||||
|
||||
# 计算最优储能容量
|
||||
|
||||
Reference in New Issue
Block a user