add focus_weights to documentation
This commit is contained in:
parent
54afa891cc
commit
dfecf35bae
@ -18,6 +18,8 @@ remote:
|
||||
ssh: ""
|
||||
path: ""
|
||||
|
||||
focus_weights: false
|
||||
|
||||
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#run
|
||||
run:
|
||||
name: ""
|
||||
|
@ -10,3 +10,4 @@ private,,,
|
||||
remote,,,
|
||||
-- ssh,--,,Optionally specify the SSH of a remote cluster to be synchronized.
|
||||
-- path,--,,Optionally specify the file path within the remote cluster to be synchronized.
|
||||
focus_weights,,,Optionally specify the focus weights for the clustering of countries. For instance: `DE: 0.8` will distribute 80% of all nodes to Germany and 20% to the rest of the countries.
|
||||
|
|
@ -237,7 +237,7 @@ def distribute_clusters(n, n_clusters, focus_weights=None, solver_name="cbc"):
|
||||
n_clusters >= len(N) and n_clusters <= N.sum()
|
||||
), f"Number of clusters must be {len(N)} <= n_clusters <= {N.sum()} for this selection of countries."
|
||||
|
||||
if focus_weights is not None:
|
||||
if isinstance(focus_weights, dict):
|
||||
total_focus = sum(list(focus_weights.values()))
|
||||
|
||||
assert (
|
||||
|
Loading…
Reference in New Issue
Block a user