Skip to content

Commit

Permalink
*rewind back to working pypsa-eur commit * solve interface bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ulfmueller committed Nov 26, 2024
1 parent 5394eff commit 205acc6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/egon/data/datasets/electrical_neighbours.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def buses(scenario, sources, targets):
central_buses.scn_name = scenario

central_buses.drop(
["control", "generator", "location", "unit", "sub_network", "substation_off"],
["control", "generator", "location", "unit", "sub_network", "substation_off", "substation_lv"],
axis="columns",
inplace=True,
errors="ignore"
Expand Down
21 changes: 15 additions & 6 deletions src/egon/data/datasets/pypsaeur/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class PreparePypsaEur(Dataset):
def __init__(self, dependencies):
super().__init__(
name="PreparePypsaEur",
version="0.0.23",
version="0.0.29",
dependencies=dependencies,
tasks=(
download,
Expand All @@ -43,7 +43,7 @@ class RunPypsaEur(Dataset):
def __init__(self, dependencies):
super().__init__(
name="SolvePypsaEur",
version="0.0.20",
version="0.0.22",
dependencies=dependencies,
tasks=(
execute,
Expand Down Expand Up @@ -75,6 +75,15 @@ def download():
]
)

subproc.run(
[
"git",
"checkout",
"2119f4cee05c256509f48d4e9fe0d8fd9e9e3632"],
cwd=pypsa_eur_repos,
)


# Add gurobi solver to environment:
# Read YAML file
#path_to_env = pypsa_eur_repos / "envs" / "environment.yaml"
Expand Down Expand Up @@ -113,10 +122,10 @@ def download():
)

# Copy custom_extra_functionality.py file for egon-data to pypsa-eur directory
#shutil.copy(
# Path(__path__[0], "datasets", "pypsaeur", "custom_extra_functionality.py"),
# pypsa_eur_repos / "data",
#)
shutil.copy(
Path(__path__[0], "datasets", "pypsaeur", "custom_extra_functionality.py"),
pypsa_eur_repos / "data",
)


with open(filepath / "Snakefile", "w") as snakefile:
Expand Down
19 changes: 7 additions & 12 deletions src/egon/data/datasets/pypsaeur/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ co2_budget:

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#electricity
electricity:
voltages: [220., 300., 330., 380., 400., 500., 750.]
voltages: [200., 220., 300., 380., 500., 750.]
base_network: osm-prebuilt
osm-prebuilt-version: 0.5
osm-prebuilt-version: 0.4
gaslimit_enable: false
gaslimit: false
co2limit_enable: false
Expand Down Expand Up @@ -277,11 +277,10 @@ conventional:
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#lines
lines:
types:
200.: "Al/St 240/40 2-bundle 200.0"
220.: "Al/St 240/40 2-bundle 220.0"
300.: "Al/St 240/40 3-bundle 300.0"
330.: "Al/St 240/40 3-bundle 300.0"
380.: "Al/St 240/40 4-bundle 380.0"
400.: "Al/St 240/40 4-bundle 380.0"
500.: "Al/St 240/40 4-bundle 380.0"
750.: "Al/St 560/50 4-bundle 750.0"
s_max_pu: 0.7
Expand All @@ -303,7 +302,7 @@ links:
p_nom_max: .inf
max_extension: 30000 #MW
length_factor: 1.25
under_construction: 'keep' # 'zero': set capacity to zero, 'remove': remove, 'keep': with full capacity for lines in grid extract
under_construction: 'zero' # 'zero': set capacity to zero, 'remove': remove, 'keep': with full capacity for lines in grid extract

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#transmission_projects
transmission_projects:
Expand Down Expand Up @@ -597,12 +596,8 @@ sector:
overdimension_heat_generators:
decentral: 1.1 #to cover demand peaks bigger than data
central: 1.0
chp:
enable: true
fuel:
- solid biomass # For solid biomass, CHP with and without CC are added
- gas # For all other fuels the same techno economic data from gas CHP is taken
micro_chp: false # Only gas is used for micro_chp
chp: true
micro_chp: false
solar_thermal: true
solar_cf_correction: 0.788457 # = >>> 1/1.2683
marginal_cost_storage: 0. #1e-4
Expand Down Expand Up @@ -876,7 +871,7 @@ clustering:
ramp_limit_down: max
temporal:
resolution_elec: false
resolution_sector: false
resolution_sector: 3H

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#adjustments
adjustments:
Expand Down

0 comments on commit 205acc6

Please sign in to comment.