Commit 8120737c authored by kdas's avatar kdas

Added a price profile data file

parent d84802f7
Pipeline #21237 failed with stages
in 34 seconds
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# -*- coding: utf-8 -*-
"""
Created on Sun Nov 10 12:05:52 2019
@author: kdas
"""
# -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
from HyDesign.sizing import HPP, read_csv_Data
if __name__ == "__main__":
# =============================================================================
# # Alessandra's data
# =============================================================================
input_wind_ts_filename = './Data/aveW.csv'
input_solar_ts_filename = './Data/aveS.csv'
input_price_ts_filename = './Data/PriceProfilePPA.csv'
start_date = pd.to_datetime('2018-09-01 00:00')
end_date = pd.to_datetime("2019-08-31 23:00")
timeFormat_wind = "%d/%m/%Y %H:%M"
timeFormat_solar = "%d/%m/%Y %H:%M"
timeFormat_price = '%d/%m/%Y %H:%M'
timename = 'Time'
timeZone_wind = 'Asia/Kolkata'
timeZone_solar = 'Asia/Kolkata'
timeZone_price = 'Asia/Kolkata'
timeZone_analysis = 'Asia/Kolkata'
# inputs
# Alessandra's data
parameter_dict = {
# hpp parameters
'hpp_grid_connection': 300, # in MW
'hpp_land_area_available': 100, # in square km
'hpp_lifetime': 25, # [years]
'hpp_discount_factor': 0.07,
'hpp_BOS_soft_cost': 119940, # [Eur/MW]
'hpp_grid_connection_cost': 37074, # [Eur/MW]
# hpp wind parameters
'wind_rating_WT': 2.1,
'wind_nWT_per_string': 20,
'wind_lifetime_WT': 30,
'wind_rotor_diameter': 97, # in m
'wind_hub_height': 120, # in m
'wind_turbine_spacing': 5, # in terms of Rotor Diameter
'wind_turbine_row_spacing': 10, # in terms of Rotor Diameter
'wind_turbine_cost': 851000, # [EUR/MW]
'wind_civil_works_cost': 116986, # [Eur/MW]
'wind_fixed_onm_cost': 12805, # Wind fixed O&M cost per year [Eur/MW]
# hpp solar parameters
'solar_lifetime_PV': 30,
'solar_PV_cost': 219000, # [EUR/MW]
'solar_hardware_installation_cost': 241854, # [Eur/MW]
'solar_fixed_onm_cost': 8149, # Solar O&M cost per year [Eur/MW]
# hpp battery parameters
'battery_energy_cost': 181596, # Eur/MWh
'battery_power_cost': 64190, # Power conversion system cost[Eur/MW]
# Electric Balance of Plant, installation, commissioning cost [Eur/MW]
'battery_BOP_installation_commissioning_cost': 73360,
# Grid management control system cost[Eur/MW]
'battery_control_system_cost': 18340,
# Battery energy capacity maintenance cost [Eur/MWh] per year
'battery_energy_onm_cost': 10000,
'battery_depth_of_discharge': 0.9,
}
simulation_dict = {
'wind_as_component': 1,
'solar_as_component': 1,
'battery_as_component': 1,
}
ExampleHPP = HPP(
parameter_dict=parameter_dict,
simulation_dict=simulation_dict,
)
wind_power_t = read_csv_Data(
input_wind_ts_filename,
timename,
timeFormat_wind,
timeZone_wind,
timeZone_analysis,
)
solar_power_t = read_csv_Data(
input_solar_ts_filename,
timename,
timeFormat_solar,
timeZone_solar,
timeZone_analysis,
)
spot_price_t = read_csv_Data(
input_price_ts_filename,
timename,
timeFormat_price,
timeZone_price,
timeZone_analysis,
)
wind_power_t = wind_power_t.loc[start_date:end_date, 'Pwind'] / 100
solar_power_t = solar_power_t.loc[start_date:end_date, 'Psolar'] / 100
spot_price_t = spot_price_t.loc[start_date:end_date, 'Price']
capacity_factor_wind = ExampleHPP.calculate_Capacity_Factor(
wind_power_t, 1)
capacity_factor_solar = ExampleHPP.calculate_Capacity_Factor(
solar_power_t, 1)
# %% -----------------------------------------------
# Optimize the sizing of HPP (wind and solar)
# --------------------------------------------------
[hpp_wind_capacity, hpp_solar_capacity, P_HPP_t,
P_curtailment_t, hpp_investment_cost, hpp_maintenance_cost,
LCOE, NPV, IRR] = ExampleHPP.sizing_Wind_Solar(
wind_power_t, solar_power_t, spot_price_t)
# %%
AEP = P_HPP_t.mean() * 8760 / 1000
Curtailed_Energy = P_curtailment_t.sum() / 1000
# print("\033[H\033[J")
print()
print('Wind Capacity = %d MW' % hpp_wind_capacity)
print('Solar Capacity = %d MW' % hpp_solar_capacity)
print('AEP = %.0f GWh' % AEP)
print('Curtailed Energy = %.0f GWh' % Curtailed_Energy)
print('HPP Investment Cost = %.0f MEUR' % (hpp_investment_cost / 1e6))
print('HPP Maintenance Cost = %.0f MEUR' %
(hpp_maintenance_cost.sum() / 1e6))
print('HPP LCOE = %.2f EUR/MWh' % LCOE)
print('HPP NPV= %.0f MEUR' % (NPV / 1000000))
print('HPP IRR = %.0f%%' % (IRR * 100))
# %% -----------------------------------------------
# Eval a non-optimal HPP (wind and solar)
# --------------------------------------------------
[hpp_wind_capacity, hpp_solar_capacity, P_HPP_t,
P_curtailment_t, hpp_investment_cost, hpp_maintenance_cost,
LCOE, NPV, IRR] = ExampleHPP.eval_Wind_Solar(
wind_power_t, solar_power_t, spot_price_t,
Wind_MW=200, Solar_MW=300)
# %%
AEP = P_HPP_t.mean() * 8760 / 1000
Curtailed_Energy = P_curtailment_t.sum() / 1000
# print("\033[H\033[J")
print()
print('Wind Capacity = %d MW' % hpp_wind_capacity)
print('Solar Capacity = %d MW' % hpp_solar_capacity)
print('AEP = %.0f GWh' % AEP)
print('Curtailed Energy = %.0f GWh' % Curtailed_Energy)
print('HPP Investment Cost = %.0f MEUR' % (hpp_investment_cost / 1e6))
print('HPP Maintenance Cost = %.0f MEUR' %
(hpp_maintenance_cost.sum() / 1e6))
print('HPP LCOE = %.2f EUR/MWh' % LCOE)
print('HPP NPV= %.0f MEUR' % (NPV / 1000000))
print('HPP IRR = %.0f%%' % (IRR * 100))
# %% --------------------------------------------------
# Optimize the sizing of HPP (wind, solar and battery)
# -----------------------------------------------------
[hpp_wind_capacity,
hpp_solar_capacity,
hpp_battery_power_rating,
hpp_battery_energy_capacity,
P_RES_available_t,
P_HPP_t,
P_curtailment_t,
P_charge_discharge_t,
E_SOC_t,
hpp_investment_cost,
hpp_maintenance_cost,
LCOE,
NPV,
IRR] = ExampleHPP.sizing_Wind_Solar_Battery(wind_power_t,
solar_power_t,
spot_price_t)
# %%
AEP = P_HPP_t.mean() * 8760 / 1000
Curtailed_Energy = P_curtailment_t.sum() / 1000
# print("\033[H\033[J")
print()
print('Wind Capacity = %d MW' % hpp_wind_capacity)
print('Solar Capacity = %d MW' % hpp_solar_capacity)
print('Battery Storage Power Rating = %d MW' % hpp_battery_power_rating)
print(
'Battery Storage Energy Rating = %d MWh' %
hpp_battery_energy_capacity)
print('AEP = %.0f GWh' % AEP)
print('Curtailed Energy = %.0f GWh' % Curtailed_Energy)
print('HPP Investment Cost = %.0f MEUR' % (hpp_investment_cost / 1e6))
print('HPP Maintenance Cost = %.0f MEUR' %
(hpp_maintenance_cost.sum() / 1e6))
print('HPP LCOE = %.2f EUR/MWh' % LCOE)
print('HPP NPV= %.0f MEUR' % (NPV / 1000000))
print('HPP IRR = %.0f%%' % (IRR * 100))
# %% --------------------------------------------------
# Eval a HPP (wind, solar and battery)
# -----------------------------------------------------
[hpp_wind_capacity,
hpp_solar_capacity,
hpp_battery_power_rating,
hpp_battery_energy_capacity,
P_RES_available_t,
P_HPP_t,
P_curtailment_t,
P_charge_discharge_t,
E_SOC_t,
hpp_investment_cost,
hpp_maintenance_cost,
LCOE,
NPV,
IRR] = ExampleHPP.eval_Wind_Solar_Battery(
wind_power_t,
solar_power_t,
spot_price_t,
Wind_MW=200,
Solar_MW=300,
P_batt_MW=100,
E_batt_MWh=300
)
# %%
AEP = P_HPP_t.mean() * 8760 / 1000
Curtailed_Energy = P_curtailment_t.sum() / 1000
# print("\033[H\033[J")
print()
print('Wind Capacity = %d MW' % hpp_wind_capacity)
print('Solar Capacity = %d MW' % hpp_solar_capacity)
print('Battery Storage Power Rating = %d MW' % hpp_battery_power_rating)
print(
'Battery Storage Energy Rating = %d MWh' %
hpp_battery_energy_capacity)
print('AEP = %.0f GWh' % AEP)
print('Curtailed Energy = %.0f GWh' % Curtailed_Energy)
print('HPP Investment Cost = %.0f MEUR' % (hpp_investment_cost / 1e6))
print('HPP Maintenance Cost = %.0f MEUR' %
(hpp_maintenance_cost.sum() / 1e6))
print('HPP LCOE = %.2f EUR/MWh' % LCOE)
print('HPP NPV= %.0f MEUR' % (NPV / 1000000))
print('HPP IRR = %.0f%%' % (IRR * 100))
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment