Source code for program_files.urban_district_upscaling.components.Link

"""
    Christian Klemm - christian.klemm@fh-muenster.de
    Gregor Becker - gregor.becker@fh-muenster.de
    Janik Budde - janik.budde@fh-muenster.de
"""
import pandas





[docs]def create_central_electricity_bus_connection( cluster: str, sheets: dict, standard_parameters: pandas.ExcelFile ) -> dict: """ In this method, clustered buildings are connected to the local electricity market. For this purpose, a link is created between the cluster power bus and the central power bus and, if available, another link between the cluster pv bus and the central power bus. These are attached to the return structure "sheets". :param cluster: Cluster id :type cluster: str :param sheets: dictionary containing the pandas.Dataframes that\ will represent the model definition's Spreadsheets :type sheets: dict :param standard_parameters: pandas imported ExcelFile \ containing the non-building specific technology data :type standard_parameters: pandas.ExcelFile :return: - **sheets** (dict) - dictionary containing the \ pandas.Dataframes that will represent the model \ definition's Spreadsheets which was modified in this method """ # add link from central electricity bus to cluster electricity bus if (cluster + "_central_electricity_link") not in sheets["links"].index: sheets = create_link( label=cluster + "_central_electricity_link", bus_1="central_electricity_bus", bus_2=cluster + "_electricity_bus", link_type="electricity central link decentral", sheets=sheets, standard_parameters=standard_parameters ) sheets["links"].set_index("label", inplace=True, drop=False) # add link from cluster pv bus to cluster electricity bus if ((cluster + "_pv_" + cluster + "_electricity_link") not in list(sheets[ "links"]["label"]) and (cluster + "_pv_central") in sheets["links"].index): sheets = create_link( label=cluster + "_pv_" + cluster + "_electricity_link", bus_1=cluster + "_pv_bus", bus_2=cluster + "_electricity_bus", link_type="electricity photovoltaic decentral link decentral", sheets=sheets, standard_parameters=standard_parameters) sheets["links"].set_index("label", inplace=True, drop=False) return sheets