pommes.visualisation.energy_cost_plot
Module for energy cost plot.
Attributes
Functions
|
A hydrogen cost per MWh as a cost per kg [EUR/kg]. |
|
A hydrogen cost per kg as a cost per MWh [EUR/MWh]. |
|
Select on the dimensions |
|
A quantity per step summed over the year, as the objective counts it. |
|
Cost items of a resource per MWh produced by its conversions. |
|
Plot the production cost by cost item for the selected resource. |
Module Contents
- pommes.visualisation.energy_cost_plot.HYDROGEN_MWH_PER_KG = 0.03333
- pommes.visualisation.energy_cost_plot.MIN_PRODUCTION = 100.0
- pommes.visualisation.energy_cost_plot.ITEMS
- pommes.visualisation.energy_cost_plot.eur_per_mwh_to_eur_per_kg(cost: float) float
A hydrogen cost per MWh as a cost per kg [EUR/kg].
- pommes.visualisation.energy_cost_plot.eur_per_kg_to_eur_per_mwh(cost: float) float
A hydrogen cost per kg as a cost per MWh [EUR/MWh].
- pommes.visualisation.energy_cost_plot._sel(da: xarray.DataArray, **labels: object) xarray.DataArray
Select on the dimensions
dahas, ignore the others.
- pommes.visualisation.energy_cost_plot._annual(da: xarray.DataArray, parameters: xarray.Dataset) xarray.DataArray
A quantity per step summed over the year, as the objective counts it.
Summed over the modelled steps, scaled to the year by
operation_year_normalization(), and taken as its expectation over the operating conditions of each year.
- pommes.visualisation.energy_cost_plot._energy_cost_per_mwh(solution: xarray.Dataset, parameters: xarray.Dataset, dual: xarray.Dataset, resource: str, plot_choice: str, areas: list[str], years: list[int]) pandas.DataFrame
Cost items of a resource per MWh produced by its conversions.
Every item is an annual cost [EUR], divided by the annual production of the resource by the conversion technologies that produce it [MWh]:
the CAPEX and OPEX of these conversions, of the storages whose main resource it is, of the transports that carry it, and the cost of its imports, read in “Total costs - EUR”;
the other resources these conversions consume, at their marginal price, the dual of the adequacy row read in EUR/MWh;
its load shedding and spillage, at their costs.
- Returns:
One row per label of
plot_choice(an area or a year), one column per item ofITEMS[EUR/MWh]; 0 where the production is belowMIN_PRODUCTION.- Return type:
pandas.DataFrame
- pommes.visualisation.energy_cost_plot.plot_energy_cost(solution_path: str, resource: str, plot_choice: str, areas: list[str] | None = None, years: list[int] | None = None, title: str = 'Energy cost', save: bool = True, save_name: str = 'Energy cost') matplotlib.figure.Figure
Plot the production cost by cost item for the selected resource.
The cost items are those of
_energy_cost_per_mwh(): annual costs divided by the annual production of the resource by the conversion technologies that produce it.- Parameters:
solution_path (str) – Path to the solution files containing model results.
resource (str) – The energy resource for which production costs are plotted.
plot_choice (str) – Selection mode for the plot, either ‘area’ or ‘year’. - ‘area’: Compares costs across different areas in a given year. - ‘year’: Compares costs across different years in a given area.
areas (list[str] | None, optional) – List of areas to include in the plot. If None, all areas are considered.
years (list[int] | None, optional) – List of years to include in the plot. If None, all years are considered.
title (str, optional) – Title of the plot. Defaults to “Energy cost”.
save (bool, optional) – If True, saves the figure as an image. Defaults to True.
save_name (str, optional) – Filename for saving the figure. Defaults to “Energy cost”.
- Returns:
The figure, also shown and optionally saved as an image.
- Return type:
matplotlib.figure.Figure
- Raises:
ValueError – If plot_choice is not ‘area’ or ‘year’.
ValueError – If plot_choice is ‘area’ but multiple years are selected.
ValueError – If plot_choice is ‘year’ but multiple areas are selected.