This commit is contained in:
Jan Frederick 2020-03-31 11:16:55 +02:00
commit 7e84ed4d81
3 changed files with 11 additions and 11 deletions

View File

@ -5,7 +5,7 @@ channels:
dependencies: dependencies:
#- python #- python
- pip - pip
# - pypsa>=0.16 # until PyPSA/a3c0991 released - pypsa>=0.17
- atlite - atlite
# Dependencies of the workflow itself # Dependencies of the workflow itself
@ -47,7 +47,6 @@ dependencies:
- vresutils==0.3.1 - vresutils==0.3.1
- git+https://github.com/PyPSA/glaes.git#egg=glaes - git+https://github.com/PyPSA/glaes.git#egg=glaes
- git+https://github.com/PyPSA/geokit.git#egg=geokit - git+https://github.com/PyPSA/geokit.git#egg=geokit
- git+https://github.com/PyPSA/pypsa.git#egg=pypsa # until PyPSA/a3c0991 released
- cdsapi - cdsapi
- sphinx - sphinx
- sphinx_rtd_theme - sphinx_rtd_theme

View File

@ -8,7 +8,7 @@ dependencies:
- python - python
- pip - pip
# - pypsa>=0.16 # until PyPSA/a3c0991 released - pypsa>=0.17
- atlite - atlite
# Dependencies of the workflow itself # Dependencies of the workflow itself
@ -53,5 +53,4 @@ dependencies:
- vresutils==0.3.1 - vresutils==0.3.1
- git+https://github.com/PyPSA/glaes.git#egg=glaes - git+https://github.com/PyPSA/glaes.git#egg=glaes
- git+https://github.com/PyPSA/geokit.git#egg=geokit - git+https://github.com/PyPSA/geokit.git#egg=geokit
- git+https://github.com/PyPSA/pypsa.git#egg=pypsa # until PyPSA/a3c0991 released
- cdsapi - cdsapi

View File

@ -262,13 +262,15 @@ def clustering_for_n_clusters(n, n_clusters, aggregate_carriers=None,
generator_strategies={'p_nom_max': p_nom_max_strategy}, generator_strategies={'p_nom_max': p_nom_max_strategy},
scale_link_capital_costs=False) scale_link_capital_costs=False)
nc = clustering.network if not n.links.empty:
nc.links['underwater_fraction'] = (n.links.eval('underwater_fraction * length') nc = clustering.network
.div(nc.links.length).dropna()) nc.links['underwater_fraction'] = (n.links.eval('underwater_fraction * length')
nc.links['capital_cost'] = (nc.links['capital_cost'] .div(nc.links.length).dropna())
.add((nc.links.length - n.links.length) nc.links['capital_cost'] = (nc.links['capital_cost']
.clip(lower=0).mul(extended_link_costs), .add((nc.links.length - n.links.length)
fill_value=0)) .clip(lower=0).mul(extended_link_costs),
fill_value=0))
return clustering return clustering
def save_to_geojson(s, fn): def save_to_geojson(s, fn):