Update cluster_network to avoid adding deleted links in clustered network
This commit is contained in:
parent
80eadcf24a
commit
176bebdef0
@ -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