Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes/#130 set cyclic to True for storages #137

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading