components#

Module components Contains classes to describe the components of an hybrid power plant

Class Storage:

Represent storage system that can be charged or discharged

Class Production:

Represent a power plant (wind or pv) production electricity from a given resource

Class OpSchedule:

Represent the operational schedule of the hybrid power plant.

Module Contents#

Classes#

Storage

Class Storage used to represent energy storage systems

Production

Class Production represents wind or solar PV production systems

OpSchedule

Class OpSchedule describes a realization of an energy schedule and renewable electric production units.

API#

class components.Storage(e_cap: float = 0, p_cap: float = 0, eff_in: float = 1, eff_out: float = 1, e_cost: float = 0, p_cost: float = 0, soc_min: float = 0, soc_max: float = 1, lifetime: int = 8, opex_fix: float = 0, opex_var: float = 0)#

Class Storage used to represent energy storage systems

e_cap#

Energy capacity [MWh]

Type:

float

p_cap#

Power capacity [MW]

Type:

float

eff_in#

Efficiency to charge the storage [-]

Type:

float

eff_out#

Efficiency to discharge the storage [-]

Type:

float

e_cost#

Cost per unit of energy capacity [Currency/MWh]

Type:

float

p_cost#

Cost per unit of power capacity [Currency/MW]

Type:

float

soc_min#

Minimum allowed state-of-charge, expressed as a fraction of the energy capacity (between 0 and 1) [-]

Type:

float

soc_max#

Maximum allowed state-of-charge, expressed as a fraction of the energy capacity (between 0 and 1) [-]

Type:

float

lifetime#

Number of years in the lifetime of the storage (default is 8)

Type:

int

opex_fix#

Annual OPEX of the component per unit of power capacity (Currency/MW/year)

Type:

float

opex_var#

Annual OPEX of the component per unit of energy cycled/delivered (Currency/MWh/year)

Type:

float

Initialization

get_av_eff() → float#

Returns the average efficiency

get_rt_eff() → float#

Returns the round trip efficiency

get_tot_costs() → float#

Returns total costs for the storage

get_min_e() → float#

Returns minimum allowed energy level

copy() → components.Storage#

Create a deep copy of the Storage object

__repr__() → str#
class components.Production(power_ts: shipp.timeseries.TimeSeries, p_cost: float = 0, p_max: float = None, opex_fix: float = 0, opex_var: float = 0)#

Class Production represents wind or solar PV production systems

power_ts#

time series of power production [MW]

Type:

TimeSeries

p_max#

Maximum power [MW]

Type:

float

p_cost#

cost per unit of power capacity [Currency/MW]

Type:

float

p_max#

rated capacity [MW]

Type:

float

opex_fix#

Annual OPEX of the component per unit of power capacity (Currency/MW/year)

Type:

float

opex_var#

Annual OPEX of the component per unit of energy produced (Currency/MWh/year)

Type:

float

Initialization

get_tot_costs() → float#

Returns total costs for the production

curtail(p_curtail: numpy.ndarray) → components.Production#
__repr__() → str#
class components.OpSchedule(production_list: list[components.Production], storage_list: list[components.Storage], production_p: list[shipp.timeseries.TimeSeries], storage_p: list[shipp.timeseries.TimeSeries], storage_e: list[shipp.timeseries.TimeSeries], price: numpy.ndarray = None, p_curtail: shipp.timeseries.TimeSeries = None)#

Class OpSchedule describes a realization of an energy schedule and renewable electric production units.

storage_list#

List of energy storage units.

Type:

list[Storage]

production_list#

List of renewable power production units.

Type:

list[Production]

production_p#

List of TimeSeries for the power output of production units.

Type:

list[TimeSeries]

storage_p#

List of TimeSeries for the power output of storage units.

Type:

list[TimeSeries]

storage_e#

List of TimeSeries for the energy level of storage objects.

Type:

list[TimeSeries]

power_out#

TimeSeries of total power to the grid.

Type:

TimeSeries

revenue#

Total revenue from selling electricity.

Type:

float

annual_revenue#

Estimated annual revenue from selling electricity.

Type:

float

capex#

Total capital expenditure from storage and production objects.

Type:

float

revenue_storage#

Total revenue from storage units.

Type:

float

annual_revenue_storage#

Estimated annual revenue from storage units.

Type:

float

npv#

Net Present Value of the operation schedule.

Type:

float

irr#

Internal Rate of Return of the operation schedule.

Type:

float

a_npv#

Added Net Present Value due to the addition of storage.

Type:

float

losses#

List of storage power losses. Set when solving the dispatch optimization.

Type:

list

Initialization

Initialization function for OpSchedule

update_capex() → None#

Function to calculate the total CAPEX from Storage and Production objects.

update_revenue(price: numpy.ndarray) → None#

Function to calculate the yearly revenue for the operating schedule. The revenue is obtained by selling the electricity to the grid (power_out) at the given price

Parameters:

price (np.ndarray) – day-ahead market price [currency/MWh]

get_npv_irr(discount_rate: float, n_year: int) → tuple[float, float]#

Function to calculate the Net Present Value (npv) and internal rate of return (irr) for the OpSchedule object

Parameters:
  • rate (discount) – Usually 3, 7 or 10% for wind energy project [-]

  • n_year (int) – Number of years of operation [-]

Returns:

Net Present Value [M.currency] and Internal Rate of return [-]

Return type:

tuple[float, float]

get_added_npv(discount_rate: float, n_year: int) → float#

Function to calculate the difference in Net Present Value due to the addition of the storage (added NPV)

Parameters:
  • discount_rate (float) – Usually 3, 7 or 10% for wind energy projects. [-]

  • n_year (int) – Number of years of operation. [-]

Returns:

added Net Present Value [M.currency]

Return type:

float

get_power_partition() → list[float]#

Function to calculate the partition of the total power production for each component, expressed as percentage of the total energy produced.

Returns:

array of percentage corresponding to the objects in self.production_list and then the one in self.storage_list [-]

Return type:

list[float]

check_losses(tol: float, verbose: bool = False) → bool#

Check the losses in the model and verify if they are within the tolerance.

Parameters:
  • tol (float) – The tolerance level for the losses. [-]

  • verbose (bool) – If True, prints the error values. Default is False.

Returns:

True if the losses are within the tolerance, False otherwise.

Return type:

bool

plot_powerflow(label_list: list[str] = None, xlabel: str = 'Time [day]', ylabel1: str = 'Power [MW]', ylabel2: str = 'Energy [MWh]') → None#

Function to plot the power flow of the operation schedule

Parameters:
  • label_list (list[str]) – list of labels to appear on the legend

  • xlabel (str) – label of the x-axis

  • ylabel1 (str) – label of the y-axis (left) for power

  • ylabel2 (str) – label of the y-axis (right) for energy

plot_powerout(label_list: list[str] = None, xlabel: str = 'Time [day]', ylabel: str = 'Power [MW]', xlim: list[float] = None) → None#

Function to plot the power the operation schedule, focusing on the power sent to the grid (power “out”).

Parameters:
  • label_list (list[str]) – list of labels to appear on the legend

  • xlabel (str) – label of the x-axis

  • ylabel (str) – label of the y-axis for power

  • xlim (list[float]) – x range limits for the plot, allows to reduce computational effort