Make the additive potential aggregation the default and call it simple
This commit is contained in:
parent
e2078f25cd
commit
8ee596ae2c
@ -71,7 +71,7 @@ renewable:
|
||||
distance: 1000
|
||||
distance_grid_codes: [1, 2, 3, 4, 5, 6]
|
||||
natura: true
|
||||
potential: conservative # or heuristic
|
||||
potential: simple # or conservative
|
||||
clip_p_max_pu: 1.e-2
|
||||
offwind-ac:
|
||||
cutout: europe-2013-era5
|
||||
@ -84,7 +84,7 @@ renewable:
|
||||
natura: true
|
||||
max_depth: 50
|
||||
max_shore_distance: 80000
|
||||
potential: conservative # or heuristic
|
||||
potential: simple # or conservative
|
||||
clip_p_max_pu: 1.e-2
|
||||
offwind-dc:
|
||||
cutout: europe-2013-era5
|
||||
@ -98,7 +98,7 @@ renewable:
|
||||
natura: true
|
||||
max_depth: 50
|
||||
min_shore_distance: 80000
|
||||
potential: conservative # or heuristic
|
||||
potential: simple # or conservative
|
||||
clip_p_max_pu: 1.e-2
|
||||
solar:
|
||||
cutout: europe-2013-sarah
|
||||
@ -114,7 +114,7 @@ renewable:
|
||||
corine: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
|
||||
14, 15, 16, 17, 18, 19, 20, 26, 31, 32]
|
||||
natura: true
|
||||
potential: conservative # or heuristic
|
||||
potential: simple # or conservative
|
||||
clip_p_max_pu: 1.e-2
|
||||
hydro:
|
||||
cutout: europe-2013-era5
|
||||
|
@ -130,7 +130,9 @@ if __name__ == '__main__':
|
||||
|
||||
p_nom_max_meth = config.get('potential', 'conservative')
|
||||
|
||||
if p_nom_max_meth == 'conservative':
|
||||
if p_nom_max_meth == 'simple':
|
||||
p_nom_max = 0.8 * xr.DataArray(np.asarray(potmatrix.sum(axis=1)).squeeze(), [buses])
|
||||
elif p_nom_max_meth == 'conservative':
|
||||
# p_nom_max has to be calculated for each bus and is the minimal ratio
|
||||
# (min over all weather grid cells of the bus region) between the available
|
||||
# potential (potmatrix) and the used normalised layout (layoutmatrix /
|
||||
@ -139,10 +141,8 @@ if __name__ == '__main__':
|
||||
# corresponds to capacities/max(capacity factor in the voronoi cell)
|
||||
p_nom_max = xr.DataArray([1./np.max(capacity_factor[inds]) if len(inds) else 0.
|
||||
for inds in np.split(potmatrix.indices, potmatrix.indptr[1:-1])], [buses]) * capacities
|
||||
elif p_nom_max_meth == 'heuristic':
|
||||
p_nom_max = 0.8 * xr.DataArray(np.asarray(potmatrix.sum(axis=1)).squeeze(), [buses])
|
||||
else:
|
||||
raise AssertionError('Config key `potential` should be one of "conservative" (default) or "heuristic",'
|
||||
raise AssertionError('Config key `potential` should be one of "simple" (default) or "conservative",'
|
||||
' not "{}"'.format(p_nom_max_meth))
|
||||
|
||||
layout = xr.DataArray(np.asarray(potmatrix.sum(axis=0)).reshape(cutout.shape),
|
||||
|
@ -119,14 +119,14 @@ def plot_busmap_for_n_clusters(n, n_clusters=50):
|
||||
del cs, cr
|
||||
|
||||
def clustering_for_n_clusters(n, n_clusters, aggregate_carriers=None,
|
||||
line_length_factor=1.25, potential_mode='conservative'):
|
||||
line_length_factor=1.25, potential_mode='simple'):
|
||||
|
||||
if potential_mode == 'conservative':
|
||||
p_nom_max_strategy = np.min
|
||||
elif potential_mode == 'heuristic':
|
||||
if potential_mode == 'simple':
|
||||
p_nom_max_strategy = np.sum
|
||||
elif potential_mode == 'conservative':
|
||||
p_nom_max_strategy = np.min
|
||||
else:
|
||||
raise AttributeError("potential_mode should be one of 'conservative' or 'heuristic', "
|
||||
raise AttributeError("potential_mode should be one of 'simple' or 'conservative', "
|
||||
"but is '{}'".format(potential_mode))
|
||||
|
||||
clustering = get_clustering_from_busmap(
|
||||
|
Loading…
Reference in New Issue
Block a user