-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 996b91a
Showing
148 changed files
with
16,111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: fcdc215d0bedfc57a14a8d537aa21449 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
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 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 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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# About this code | ||
|
||
This documentation is under construction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
aggregate_inputs | ||
================ | ||
|
||
.. py:module:: aggregate_inputs | ||
.. autoapi-nested-parse:: | ||
|
||
Spatial Aggregation of Balmorel | ||
|
||
Loads Balmorel input and aggregates them based on a gis file that includes cluster categories for each of the old region names | ||
|
||
Created on 01.10.2024 | ||
@author: Mathias Berg Rosendal, PhD Student at DTU Management (Energy Economics & Modelling) | ||
|
||
|
||
|
||
Functions | ||
--------- | ||
|
||
.. autoapisummary:: | ||
|
||
aggregate_inputs.get_symbols_to_aggregate | ||
aggregate_inputs.merge_RRR_names | ||
aggregate_inputs.merge_IRRRI_names | ||
aggregate_inputs.loop_and_replace_names | ||
aggregate_inputs.aggregate_parameter | ||
aggregate_inputs.aggregate_sets | ||
aggregate_inputs.main | ||
|
||
|
||
Module Contents | ||
--------------- | ||
|
||
.. py:function:: get_symbols_to_aggregate(incfile_folder: str, exceptions: str, mean_aggfuncs: str, median_aggfuncs: str, zero_fillnas: str) | ||
.. py:function:: merge_RRR_names(df: pandas.DataFrame, clustering: geopandas.GeoDataFrame) | ||
.. py:function:: merge_IRRRI_names(df: pandas.DataFrame, clustering: geopandas.GeoDataFrame) | ||
.. py:function:: loop_and_replace_names(df: pandas.DataFrame, clustering: geopandas.GeoDataFrame, old_column: str) | ||
.. py:function:: aggregate_parameter(db: gams.GamsDatabase, symbol: str, clustering: geopandas.GeoDataFrame, aggfunc: str, unique_names: dict, fillna: Tuple[float, int, str] = 'EPS') | ||
.. py:function:: aggregate_sets(db: gams.GamsDatabase, symbol: str, clustering: geopandas.GeoDataFrame) | ||
.. py:function:: main(model_path: str, scenario: str, exceptions: str = '', mean_aggfuncs: str = '', median_aggfuncs: str = '', zero_fillnas: str = '', incfile_folder: str = 'Output') | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
clustering | ||
========== | ||
|
||
.. py:module:: clustering | ||
.. autoapi-nested-parse:: | ||
|
||
TITLE | ||
|
||
Description | ||
|
||
Created on 11.09.2024 | ||
@author: Mathias Berg Rosendal, PhD Student at DTU Management (Energy Economics & Modelling) | ||
|
||
|
||
|
||
Attributes | ||
---------- | ||
|
||
.. autoapisummary:: | ||
|
||
clustering.cmap | ||
clustering.columns | ||
|
||
|
||
Functions | ||
--------- | ||
|
||
.. autoapisummary:: | ||
|
||
clustering.truncate_colormap | ||
clustering.correct_VRE_data | ||
clustering.convert_municipal_code_to_name | ||
clustering.collect_clusterdata | ||
clustering.apply_filters | ||
clustering.gather_data | ||
clustering.cluster | ||
clustering.new_geofile | ||
clustering.main | ||
|
||
|
||
Module Contents | ||
--------------- | ||
|
||
.. py:data:: cmap | ||
.. py:function:: truncate_colormap(cmap, minval=0.0, maxval=1.0, n=100) | ||
.. py:function:: correct_VRE_data(path_to_file, generation_name: str) | ||
.. py:function:: convert_municipal_code_to_name(to_be_converted: pandas.DataFrame, column_to_convert: Tuple[str, int], pivot_table: bool = False, exclude_regions: list = ['Herlev', 'Christiansø'], muni_geofile_path: str = 'C:\\Users\\mberos\\gitRepos\\balmorel-preprocessing\\src\\Data\\Shapefiles\\Denmark\\Adm\\gadm36_DNK_2.shp') | ||
.. py:function:: collect_clusterdata(plot_cf: bool = False) | ||
.. py:function:: apply_filters(df: pandas.DataFrame, value_name: str, aggfunc: str = 'sum') | ||
.. py:data:: columns | ||
.. py:function:: gather_data(db: gams.GamsDatabase, cluster_params: list, aggfuncs: list) | ||
.. py:function:: cluster(collected_data: pandas.DataFrame, n_clusters: int, use_connectivity: bool = True, manual_corrections: list = [['Bornholm', 'Christiansoe', 1], ['Bornholm', 'Dragoer', 1], ['Esbjerg', 'Fanoe', 1], ['Roedovre', 'Frederiksberg', 1], ['Slagelse', 'Nyborg', 0], ['Samsoe', 'Kalundborg', 0]], linkage: str = 'Ward', connection_remark: str = 'connec. included + artifical', data_remark: str = 'all combined + xy coords') | ||
.. py:function:: new_geofile(clustering: geopandas.GeoDataFrame, plot: bool = False) | ||
.. py:function:: main(model_path: str, scenario: str, cluster_params: str, aggregation_functions: str, cluster_size: int, plot_style: str = 'report') | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
create_addon_files | ||
================== | ||
|
||
.. py:module:: create_addon_files | ||
.. autoapi-nested-parse:: | ||
|
||
Create Empty Sets for Aggregated Model | ||
|
||
The clustered model will include exogenous heat and electricity demands from addons in DE, DE_VAR_T, DH, DH_VAR_T etc. | ||
Thus, this script is needed to 1) create empty files for INDUSTRY_DH, INDIVUSERS_DH etc., | ||
and 2) to create the INDUSTRY_INDUSTRY_AAA and INDIVUSERS_INDIVUSERS_AAA etc. files required for categorising sets. | ||
|
||
Created on 04.10.2024 | ||
@author: Mathias Berg Rosendal, PhD Student at DTU Management (Energy Economics & Modelling) | ||
|
||
|
||
|
||
Functions | ||
--------- | ||
|
||
.. autoapisummary:: | ||
|
||
create_addon_files.create_empty_set_files | ||
create_addon_files.create_category_files | ||
create_addon_files.main | ||
|
||
|
||
Module Contents | ||
--------------- | ||
|
||
.. py:function:: create_empty_set_files(addons: list, empty_files: list) | ||
.. py:function:: create_category_files(addons: list, clustering: geopandas.GeoDataFrame, category_files: list, **kwargs) | ||
.. py:function:: main(addons: Tuple[list, str] = ['INDUSTRY', 'HYDROGEN', 'INDIVUSERS'], empty_files: Tuple[list, str] = ['DE', 'DE_VAR_T', 'DH', 'DH_VAR_T', 'CCCRRRAAA', 'RRRAAA', 'AAA', 'AGKN', 'DISLOSS_E_AG']) | ||
30 changes: 30 additions & 0 deletions
30
_sources/autoapi/create_conversion_dictionaries/index.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
create_conversion_dictionaries | ||
============================== | ||
|
||
.. py:module:: create_conversion_dictionaries | ||
.. autoapi-nested-parse:: | ||
|
||
Is used to convert the easy-to-read-for-non-balmorel-user sets and elements to Balmorel input | ||
|
||
|
||
|
||
Attributes | ||
---------- | ||
|
||
.. autoapisummary:: | ||
|
||
create_conversion_dictionaries.exo_elec_dem_conversion_dictionaries | ||
create_conversion_dictionaries.exo_heat_dem_conversion_dictionaries | ||
create_conversion_dictionaries.exo_grid_conversion_dictionaries | ||
|
||
|
||
Module Contents | ||
--------------- | ||
|
||
.. py:data:: exo_elec_dem_conversion_dictionaries | ||
.. py:data:: exo_heat_dem_conversion_dictionaries | ||
.. py:data:: exo_grid_conversion_dictionaries | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
exo_electricity_demand | ||
====================== | ||
|
||
.. py:module:: exo_electricity_demand | ||
.. autoapi-nested-parse:: | ||
|
||
Create electricity demand profiles for Denmark | ||
Use Energinet data for municipalities: | ||
https://www.energidataservice.dk/tso-electricity/consumptionindustry | ||
Convert LAU code to municipality name with: | ||
LAU – NUTS 2021, EU-27 and EFTA / available candidate countries | ||
https://ec.europa.eu/eurostat/web/nuts/local-administrative-units | ||
Note: The dataset above also contains population | ||
|
||
Created on 22.08.2024 | ||
|
||
@author: Mathias Berg Rosendal, PhD Student at DTU Management (Energy Economics & Modelling) | ||
|
||
|
||
|
||
Attributes | ||
---------- | ||
|
||
.. autoapisummary:: | ||
|
||
exo_electricity_demand.cmap | ||
exo_electricity_demand.style | ||
exo_electricity_demand.fc | ||
|
||
|
||
Functions | ||
--------- | ||
|
||
.. autoapisummary:: | ||
|
||
exo_electricity_demand.main | ||
|
||
|
||
Module Contents | ||
--------------- | ||
|
||
.. py:data:: cmap | ||
.. py:data:: style | ||
:value: 'report' | ||
|
||
|
||
.. py:data:: fc | ||
:value: 'white' | ||
|
||
|
||
.. py:function:: main(conversion_file: str, el_dataset: str, show_difference: bool = False) | ||
Main function to process and convert dataset names, and create .inc files. | ||
Args: | ||
conversion_file (str): Path to the file containing conversion mappings. | ||
el_dataset (str): Path to the dataset file to be processed. | ||
show_difference (bool, optional): Flag to indicate whether to print the | ||
dataset before and after conversion. | ||
Defaults to False. | ||
Returns: | ||
None | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
exo_heat_demand | ||
=============== | ||
|
||
.. py:module:: exo_heat_demand | ||
.. autoapi-nested-parse:: | ||
|
||
Exogenous Heat Demands | ||
|
||
Create exogenous heat demands using data from various places | ||
|
||
Created on 20.09.2024 | ||
@author: Mathias Berg Rosendal, PhD Student at DTU Management (Energy Economics & Modelling) | ||
|
||
|
||
|
||
Attributes | ||
---------- | ||
|
||
.. autoapisummary:: | ||
|
||
exo_heat_demand.cmap | ||
exo_heat_demand.style | ||
exo_heat_demand.fc | ||
|
||
|
||
Classes | ||
------- | ||
|
||
.. autoapisummary:: | ||
|
||
exo_heat_demand.DistrictHeatAAU | ||
|
||
|
||
Functions | ||
--------- | ||
|
||
.. autoapisummary:: | ||
|
||
exo_heat_demand.create_incfile | ||
exo_heat_demand.create_DH | ||
exo_heat_demand.create_INDUSTRY_DH | ||
exo_heat_demand.create_INDIVUSERS_DH | ||
exo_heat_demand.create_INDUSTRY_DH_VAR_T | ||
exo_heat_demand.main | ||
|
||
|
||
Module Contents | ||
--------------- | ||
|
||
.. py:data:: cmap | ||
.. py:data:: style | ||
:value: 'report' | ||
|
||
|
||
.. py:data:: fc | ||
:value: 'white' | ||
|
||
|
||
.. py:class:: DistrictHeatAAU | ||
.. py:attribute:: district_heat | ||
.. py:attribute:: industry | ||
.. py:attribute:: annual_industry_demand | ||
.. py:method:: combine_data(plot: bool = False) | ||
.. py:function:: create_incfile(unique_processing) | ||
The general wrapper for creating and saving .inc files, | ||
because the creating of the IncFile class and saving it is the same every time. | ||
The unique processing of the .body content differs, however. | ||
|
||
Args: | ||
unique_processing (func): The unique processing per case | ||
**incfile_kwargs: Keyword arguments to pass to IncFile | ||
|
||
.. py:function:: create_DH(incfile, new_dataset: xarray.Dataset) | ||
.. py:function:: create_INDUSTRY_DH(incfile, new_dataset: xarray.Dataset) | ||
.. py:function:: create_INDIVUSERS_DH(incfile, new_dataset: xarray.Dataset) | ||
.. py:function:: create_INDUSTRY_DH_VAR_T(incfile, el_new_dataset: xarray.Dataset, A_suffix: str) | ||
.. py:function:: main(show_difference: bool = False) | ||
Oops, something went wrong.