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

View File

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

View File

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