Merge pull request #678 from davide-f/fix_clustering_LT
Update cluster_network to avoid adding deleted links in clustered net…
This commit is contained in:
commit
778f850a9e
@ -424,7 +424,10 @@ def clustering_for_n_clusters(
|
||||
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),
|
||||
(nc.links.length - n.links.length)
|
||||
.clip(lower=0)
|
||||
.mul(extended_link_costs)
|
||||
.dropna(),
|
||||
fill_value=0,
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user