Skip to content

Commit

Permalink
deploy: f267be5
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias157 committed Sep 17, 2024
0 parents commit 55a8beb
Show file tree
Hide file tree
Showing 93 changed files with 9,198 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: d51c6a50371dc13033259da163e204d9
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added .doctrees/about.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/autoapi/pybalmorel/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/autoapi/pybalmorel/utils/index.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Binary file added .doctrees/introduction.doctree
Binary file not shown.
Empty file added .nojekyll
Empty file.
3 changes: 3 additions & 0 deletions _sources/about.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# About this code

Work in progress ...
11 changes: 11 additions & 0 deletions _sources/autoapi/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
API Reference
=============

This page contains auto-generated API reference documentation [#f1]_.

.. toctree::
:titlesonly:

/autoapi/pybalmorel/index

.. [#f1] Created with `sphinx-autoapi <https://github.com/readthedocs/sphinx-autoapi>`_
177 changes: 177 additions & 0 deletions _sources/autoapi/pybalmorel/classes/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
pybalmorel.classes
==================

.. py:module:: pybalmorel.classes
.. autoapi-nested-parse::

Created on 08.06.2024

@author: Mathias Berg Rosendal, PhD Student at DTU Management (Energy Economics & Modelling)



Classes
-------

.. autoapisummary::

pybalmorel.classes.MainResults
pybalmorel.classes.IncFile
pybalmorel.classes.Balmorel


Module Contents
---------------

.. py:class:: MainResults(files: Union[str, list, tuple], paths: Union[str, list, tuple] = '.', scenario_names: Union[str, list, tuple] = None, system_directory: str = None)
.. py:attribute:: files
.. py:attribute:: paths
.. py:attribute:: sc
.. py:attribute:: db
.. py:method:: get_result(symbol: str, cols: str = 'None') -> pandas.DataFrame
Get a certain result from the loaded gdx file(s) into a pandas DataFrame

Args:
symbol (str): The desired result, e.g. PRO_YCRAGF
cols (str, optional): Specify custom columns. Defaults to pre-defined formats.

Returns:
pd.DataFrame: The output DataFrame



.. py:method:: interactive_bar_chart()
GUI for bar chart plotting



.. py:method:: plot_profile(commodity: str, year: int, scenario: str = 0, columns: str = 'Technology', region: str = 'ALL', style: str = 'light') -> Tuple[matplotlib.figure.Figure, matplotlib.axes.Axes]
Plots the production profile of a commodity, in a year, for a certain scenario

Args:
commodity (str): The commodity (Electricity, Heat or Hydrogen)
year (int): The model year to plot
scenario (str, optional): Defaults to the first scenario in MainResults.
columns (str, optional): Technology or Fuel as . Defaults to 'Technology'.
region (str, optional): Which country, region or area to plot. Defaults to 'ALL'.
style (str, optional): Plot style, light or dark. Defaults to 'light'.

Returns:
Figure, Axes: The figure and axes objects for further manipulations



.. py:method:: plot_map(scenario: str, commodity: str, year: int, path_to_geofile: str = None, bypass_path: str = None, geo_file_region_column: str = 'id', style: str = 'light') -> Tuple[matplotlib.figure.Figure, matplotlib.axes.Axes]
Plots the transmission capacities in a scenario, of a certain commodity

Args:
path_to_result (str): Path to the .gdx file
scenario (str): The scenario name
commodity (str): Electricity or hydrogen
year (int): Model year
path_to_geofile (str, optional): The path to the fitting geofile. Defaults to '../geofiles/2024 BalmorelMap.geojson' in package directory.
bypass_path (str, optional): Extra coordinates for transmission lines for beauty. Defaults to '../geofiles/bypass_lines' in package directory.
geo_file_region_column (str, optional): The columns containing the region names of MainResults. Defaults to 'id'.
style (str, optional): Plot style. Defaults to 'light'.

Returns:
Tuple[Figure, Axes]: The figure and axes objects of the plot



.. py:method:: _existing_func_wrapper(function, *args, **kwargs)
.. py:class:: IncFile(prefix: str = '', body: str = '', suffix: str = '', name: str = 'name', path: str = 'Balmorel/base/data/')
A useful class for creating .inc-files for GAMS models
Args:
prefix (str): The first part of the .inc file.
body (str): The main part of the .inc file.
suffix (str): The last part of the .inc file.
name (str): The name of the .inc file.
path (str): The path to save the file, defaults to 'Balmorel/base/data'.


.. py:attribute:: prefix
.. py:attribute:: body
.. py:attribute:: suffix
.. py:attribute:: name
.. py:attribute:: path
.. py:method:: body_concat(df: pandas.DataFrame)
Concatenate a body temporarily being a dataframe to another dataframe




.. py:method:: body_prepare(index: list, columns: list, values: str = 'Value', aggfunc: str = 'sum', fill_value: Union[str, int] = '')
.. py:method:: save()
.. py:class:: Balmorel(model_folder: str, gams_system_directory: str = None)
A class that recognises the Balmorel folder structure, can be used to run scenarios or results

Args:
model_folder (str): The top level folder of Balmorel, where base and simex are located


.. py:attribute:: _gams_system_directory
.. py:attribute:: path
.. py:attribute:: scenarios
.. py:attribute:: input_data
.. py:method:: collect_results()
.. py:method:: run(scenario: str, cmd_line_options: dict = {})
.. py:method:: load_incfiles(scenario: str = 'base', use_provided_read_files: bool = True, read_file: str = 'Balmorel_ReadData')
Will load .inc files from the specific scenario

Args:
scenario (str, optional): The scenario that you . Defaults to 'base'.
use_provided_read_files (bool, optional): Use provided Balmorel_ReadData.gms and Balmorelbb4_ReadData.inc. Defaults to True.
read_file (str, optional): The name of the read file to be executed. Defaults to Balmorel_ReadData

Raises:
KeyError: _description_



41 changes: 41 additions & 0 deletions _sources/autoapi/pybalmorel/formatting/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
pybalmorel.formatting
=====================

.. py:module:: pybalmorel.formatting
.. autoapi-nested-parse::

Created on 03.06.2024

@author: Mathias Berg Rosendal, PhD Student at DTU Management (Energy Economics & Modelling)



Attributes
----------

.. autoapisummary::

pybalmorel.formatting.tech_colours
pybalmorel.formatting.fuel_colours
pybalmorel.formatting.balmorel_colours
pybalmorel.formatting.mberos_colours
pybalmorel.formatting.mainresult_symbol_columns
pybalmorel.formatting.mainresults_symbol_columns


Module Contents
---------------

.. py:data:: tech_colours
.. py:data:: fuel_colours
.. py:data:: balmorel_colours
.. py:data:: mberos_colours
.. py:data:: mainresult_symbol_columns
.. py:data:: mainresults_symbol_columns
27 changes: 27 additions & 0 deletions _sources/autoapi/pybalmorel/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
pybalmorel
==========

.. py:module:: pybalmorel
Subpackages
-----------

.. toctree::
:maxdepth: 1

/autoapi/pybalmorel/interactive/index
/autoapi/pybalmorel/plotting/index


Submodules
----------

.. toctree::
:maxdepth: 1

/autoapi/pybalmorel/classes/index
/autoapi/pybalmorel/formatting/index
/autoapi/pybalmorel/utils/index


15 changes: 15 additions & 0 deletions _sources/autoapi/pybalmorel/interactive/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
pybalmorel.interactive
======================

.. py:module:: pybalmorel.interactive
Submodules
----------

.. toctree::
:maxdepth: 1

/autoapi/pybalmorel/interactive/interactive_functions/index


Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pybalmorel.interactive.interactive_functions
============================================

.. py:module:: pybalmorel.interactive.interactive_functions
Functions
---------

.. autoapisummary::

pybalmorel.interactive.interactive_functions.interactive_bar_chart


Module Contents
---------------

.. py:function:: interactive_bar_chart(MainResults_instance)
GUI for bar chart plotting

MainResults_instance (MainResults): Takes an instance of the MainResults class and opens a GUI for plotting


26 changes: 26 additions & 0 deletions _sources/autoapi/pybalmorel/plotting/LoadGDX/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
pybalmorel.plotting.LoadGDX
===========================

.. py:module:: pybalmorel.plotting.LoadGDX
.. autoapi-nested-parse::

Created on 11.11.2023

@author: Mathias Berg Rosendal, PhD Student at DTU Management (Energy Economics & Modelling)



Attributes
----------

.. autoapisummary::

pybalmorel.plotting.LoadGDX.paths


Module Contents
---------------

.. py:data:: paths
Loading

0 comments on commit 55a8beb

Please sign in to comment.