Skip to content

Commit

Permalink
Merge pull request #137 from openego/fixes/#130-stores-and-storages-c…
Browse files Browse the repository at this point in the history
…ycle-condition

fixes/#130 set cyclic to True for storages
  • Loading branch information
CarlosEpia authored Nov 27, 2023
2 parents b444741 + 2dd55ef commit 3395689
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/egon/data/datasets/scenario_parameters/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,14 @@ def electricity(scenario):
** 0.5,
"standing_loss": 0,
"max_hours": 6,
"cyclic_state_of_charge": True,
},
"pumped_hydro": {
"store": read_costs(costs, "PHS", "efficiency") ** 0.5,
"dispatch": read_costs(costs, "PHS", "efficiency") ** 0.5,
"standing_loss": 0,
"max_hours": 6,
"cyclic_state_of_charge": True,
},
}
# Warning: Electrical parameters are set in osmTGmod, editing these values will not change the data!
Expand Down Expand Up @@ -363,12 +365,14 @@ def electricity(scenario):
** 0.5,
"standing_loss": 0,
"max_hours": 6,
"cyclic_state_of_charge": True,
},
"pumped_hydro": {
"store": read_costs(costs, "PHS", "efficiency") ** 0.5,
"dispatch": read_costs(costs, "PHS", "efficiency") ** 0.5,
"standing_loss": 0,
"max_hours": 6,
"cyclic_state_of_charge": True,
},
}
# Warning: Electrical parameters are set in osmTGmod, editing these values will not change the data!
Expand Down Expand Up @@ -510,12 +514,14 @@ def electricity(scenario):
** 0.5,
"standing_loss": 0,
"max_hours": 6,
"cyclic_state_of_charge": True,
},
"pumped_hydro": {
"store": read_costs(costs, "PHS", "efficiency") ** 0.5,
"dispatch": read_costs(costs, "PHS", "efficiency") ** 0.5,
"standing_loss": 0,
"max_hours": 6,
"cyclic_state_of_charge": True,
},
}
# Warning: Electrical parameters are set in osmTGmod, editing these values will not change the data!
Expand Down
9 changes: 6 additions & 3 deletions src/egon/data/datasets/storages_etrago/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def __init__(self, dependencies):


def insert_PHES():

# Get datasets configuration
sources = config.datasets()["storage_etrago"]["sources"]
targets = config.datasets()["storage_etrago"]["targets"]
Expand Down Expand Up @@ -67,6 +66,7 @@ def insert_PHES():
phes["efficiency_store"] = parameters["store"]
phes["efficiency_dispatch"] = parameters["dispatch"]
phes["standing_loss"] = parameters["standing_loss"]
phes["cyclic_state_of_charge"] = parameters["cyclic_state_of_charge"]

# Write data to db
phes.to_sql(
Expand All @@ -79,7 +79,6 @@ def insert_PHES():


def extendable_batteries_per_scenario(scenario):

# Get datasets configuration
sources = config.datasets()["storage_etrago"]["sources"]
targets = config.datasets()["storage_etrago"]["targets"]
Expand Down Expand Up @@ -156,6 +155,10 @@ def extendable_batteries_per_scenario(scenario):
"electricity", scenario
)["efficiency"]["battery"]["standing_loss"]

extendable_batteries["cyclic_state_of_charge"] = get_sector_parameters(
"electricity", scenario
)["efficiency"]["battery"]["cyclic_state_of_charge"]

extendable_batteries["carrier"] = "battery"

# Merge dataframes to fill p_nom_min column
Expand All @@ -178,4 +181,4 @@ def extendable_batteries_per_scenario(scenario):

def extendable_batteries():
for scn in config.settings()["egon-data"]["--scenarios"]:
extendable_batteries_per_scenario(scn)
extendable_batteries_per_scenario(scn)

0 comments on commit 3395689

Please sign in to comment.