diff --git a/scripts/cluster_network.py b/scripts/cluster_network.py index 2c457bef..642db4da 100644 --- a/scripts/cluster_network.py +++ b/scripts/cluster_network.py @@ -263,9 +263,9 @@ def clustering_for_n_clusters(n, n_clusters, custom_busmap=False, aggregate_carr algorithm="kmeans", extended_link_costs=0, focus_weights=None): if potential_mode == 'simple': - p_nom_max_strategy = np.sum + p_nom_max_strategy = pd.Series.sum elif potential_mode == 'conservative': - p_nom_max_strategy = np.min + p_nom_max_strategy = pd.Series.min else: raise AttributeError(f"potential_mode should be one of 'simple' or 'conservative' but is '{potential_mode}'") @@ -281,7 +281,7 @@ def clustering_for_n_clusters(n, n_clusters, custom_busmap=False, aggregate_carr aggregate_generators_carriers=aggregate_carriers, aggregate_one_ports=["Load", "StorageUnit"], line_length_factor=line_length_factor, - generator_strategies={'p_nom_max': p_nom_max_strategy, 'p_nom_min': np.sum}, + generator_strategies={'p_nom_max': p_nom_max_strategy, 'p_nom_min': pd.Series.sum}, scale_link_capital_costs=False) if not n.links.empty: