Merge branch 'master' of https://github.com/PyPSA/pypsa-eur
This commit is contained in:
commit
7e84ed4d81
@ -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
|
||||
|
@ -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
|
||||
|
@ -262,13 +262,15 @@ 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)
|
||||
|
||||
nc = clustering.network
|
||||
nc.links['underwater_fraction'] = (n.links.eval('underwater_fraction * length')
|
||||
.div(nc.links.length).dropna())
|
||||
nc.links['capital_cost'] = (nc.links['capital_cost']
|
||||
.add((nc.links.length - n.links.length)
|
||||
.clip(lower=0).mul(extended_link_costs),
|
||||
fill_value=0))
|
||||
if not n.links.empty:
|
||||
nc = clustering.network
|
||||
nc.links['underwater_fraction'] = (n.links.eval('underwater_fraction * length')
|
||||
.div(nc.links.length).dropna())
|
||||
nc.links['capital_cost'] = (nc.links['capital_cost']
|
||||
.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):
|
||||
|
Loading…
Reference in New Issue
Block a user