
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "gat_plot_examples/07_capacity_overview.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        :ref:`Go to the end <sphx_glr_download_gat_plot_examples_07_capacity_overview.py>`
        to download the full example code.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_gat_plot_examples_07_capacity_overview.py:


Generation Capacity Overview
----------------------------

Installed capacity by technology, sourced directly from the system
definition (not the simulation results). This is a useful sanity-check
view: what's actually in the model before any dispatch happens.

`plot_generation_capacities` returns ``(name, ax, dataframe)`` so you
can both render the chart and access the underlying capacity table for
further analysis.

.. GENERATED FROM PYTHON SOURCE LINES 13-32



.. image-sg:: /gat_plot_examples/images/sphx_glr_07_capacity_overview_001.png
   :alt: Generation Capacity
   :srcset: /gat_plot_examples/images/sphx_glr_07_capacity_overview_001.png
   :class: sphx-glr-single-img


.. rst-class:: sphx-glr-script-out

 .. code-block:: none

    /home/runner/work/GridAnalysisToolkit/GridAnalysisToolkit/src/gat/datahelpers/sienna.py:381: UserWarning: StandardLoad was not found. Use one of the following components
      warnings.warn(message, UserWarning)
    ----- Available Components -----
    RenewableNonDispatch
    LoadZone
    RenewableDispatch
    FixedAdmittance
    ACBus
    Area
    VariableReserve
    TwoTerminalHVDCLine
    ThermalStandard
    Arc
    PowerLoad
    TapTransformer
    Line
    /home/runner/work/GridAnalysisToolkit/GridAnalysisToolkit/src/gat/datahelpers/sienna.py:381: UserWarning: EnergyReservoirStorage was not found. Use one of the following components
      warnings.warn(message, UserWarning)
    ----- Available Components -----
    RenewableNonDispatch
    LoadZone
    RenewableDispatch
    FixedAdmittance
    ACBus
    Area
    VariableReserve
    TwoTerminalHVDCLine
    ThermalStandard
    Arc
    PowerLoad
    TapTransformer
    Line
    /home/runner/work/GridAnalysisToolkit/GridAnalysisToolkit/src/gat/datahelpers/sienna.py:381: UserWarning: HydroDispatch was not found. Use one of the following components
      warnings.warn(message, UserWarning)
    ----- Available Components -----
    RenewableNonDispatch
    LoadZone
    RenewableDispatch
    FixedAdmittance
    ACBus
    Area
    VariableReserve
    TwoTerminalHVDCLine
    ThermalStandard
    Arc
    PowerLoad
    TapTransformer
    Line
    /home/runner/work/GridAnalysisToolkit/GridAnalysisToolkit/src/gat/datahelpers/sienna.py:381: UserWarning: HydroEnergyReservoir was not found. Use one of the following components
      warnings.warn(message, UserWarning)
    ----- Available Components -----
    RenewableNonDispatch
    LoadZone
    RenewableDispatch
    FixedAdmittance
    ACBus
    Area
    VariableReserve
    TwoTerminalHVDCLine
    ThermalStandard
    Arc
    PowerLoad
    TapTransformer
    Line
    /home/runner/work/GridAnalysisToolkit/GridAnalysisToolkit/src/gat/datahelpers/sienna.py:381: UserWarning: HydroPumpedStorage was not found. Use one of the following components
      warnings.warn(message, UserWarning)
    ----- Available Components -----
    RenewableNonDispatch
    LoadZone
    RenewableDispatch
    FixedAdmittance
    ACBus
    Area
    VariableReserve
    TwoTerminalHVDCLine
    ThermalStandard
    Arc
    PowerLoad
    TapTransformer
    Line
    /home/runner/work/GridAnalysisToolkit/GridAnalysisToolkit/src/gat/datahelpers/sienna.py:381: UserWarning: ThermalMultiStart was not found. Use one of the following components
      warnings.warn(message, UserWarning)
    ----- Available Components -----
    RenewableNonDispatch
    LoadZone
    RenewableDispatch
    FixedAdmittance
    ACBus
    Area
    VariableReserve
    TwoTerminalHVDCLine
    ThermalStandard
    Arc
    PowerLoad
    TapTransformer
    Line
    generation capacity — 3 rows of capacity data
    Technology         Coal       Gas-CC  ...     Nuclear       PV
    Area                                  ...                     
    1           1230.898733   770.778827  ...  447.213595   836.23
    2           1149.191940  1156.168240  ...    0.000000   254.16
    3            174.427635  1926.947067  ...    0.000000  2367.03

    [3 rows x 6 columns]






|

.. code-block:: Python

    import warnings
    warnings.filterwarnings("ignore", category=DeprecationWarning)

    import matplotlib.pyplot as plt
    from gat.scenariohandlers import SiennaScenario
    from gat.quickplots.system_plots import plot_generation_capacities

    sienna_v4 = "../../example_data/sienna/v4"
    scenario = SiennaScenario(
        simulation_files=f"{sienna_v4}/simulation_store.h5",
        system_file=f"{sienna_v4}/sys.json",
    )

    name, ax, capacity_df = plot_generation_capacities(scenario)
    print(f"{name} — {len(capacity_df)} rows of capacity data")
    print(capacity_df.head())

    plt.tight_layout()
    plt.show()


.. rst-class:: sphx-glr-timing

   **Total running time of the script:** (0 minutes 0.209 seconds)


.. _sphx_glr_download_gat_plot_examples_07_capacity_overview.py:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download Jupyter notebook: 07_capacity_overview.ipynb <07_capacity_overview.ipynb>`

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download Python source code: 07_capacity_overview.py <07_capacity_overview.py>`

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: 07_capacity_overview.zip <07_capacity_overview.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
