add_carriers(network, config, costs)

ad the various carriers to the network based on the config file

Parameters:
  • network (Network) –

    the pypsa network

  • config (dict) –

    the config file

  • costs (DataFrame) –

    the costs dataframe

Source code in workflow/scripts/prepare_base_network.py
def add_carriers(network: pypsa.Network, config: dict, costs: pd.DataFrame):
    """ad the various carriers to the network based on the config file

    Args:
        network (pypsa.Network): the pypsa network
        config (dict): the config file
        costs (pd.DataFrame): the costs dataframe
    """

    network.add("Carrier", "AC")
    if config["heat_coupling"]:
        network.add("Carrier", "heat")
    for carrier in config["Techs"]["vre_techs"]:
        network.add("Carrier", carrier)
        if carrier == "hydroelectricity":
            network.add("Carrier", "hydro_inflow")
    for carrier in config["Techs"]["store_techs"]:
        network.add("Carrier", carrier)
        if carrier == "battery":
            network.add("Carrier", "battery discharger")

    if "coal power plant" in config["Techs"]["conv_techs"] and config["Techs"]["coal_cc"]:
        network.add("Carrier", "coal cc", co2_emissions=0.034)