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: 1000
|
||||||
distance_grid_codes: [1, 2, 3, 4, 5, 6]
|
distance_grid_codes: [1, 2, 3, 4, 5, 6]
|
||||||
natura: true
|
natura: true
|
||||||
potential: conservative # or heuristic
|
potential: simple # or conservative
|
||||||
clip_p_max_pu: 1.e-2
|
clip_p_max_pu: 1.e-2
|
||||||
offwind-ac:
|
offwind-ac:
|
||||||
cutout: europe-2013-era5
|
cutout: europe-2013-era5
|
||||||
@ -84,7 +84,7 @@ renewable:
|
|||||||
natura: true
|
natura: true
|
||||||
max_depth: 50
|
max_depth: 50
|
||||||
max_shore_distance: 80000
|
max_shore_distance: 80000
|
||||||
potential: conservative # or heuristic
|
potential: simple # or conservative
|
||||||
clip_p_max_pu: 1.e-2
|
clip_p_max_pu: 1.e-2
|
||||||
offwind-dc:
|
offwind-dc:
|
||||||
cutout: europe-2013-era5
|
cutout: europe-2013-era5
|
||||||
@ -98,7 +98,7 @@ renewable:
|
|||||||
natura: true
|
natura: true
|
||||||
max_depth: 50
|
max_depth: 50
|
||||||
min_shore_distance: 80000
|
min_shore_distance: 80000
|
||||||
potential: conservative # or heuristic
|
potential: simple # or conservative
|
||||||
clip_p_max_pu: 1.e-2
|
clip_p_max_pu: 1.e-2
|
||||||
solar:
|
solar:
|
||||||
cutout: europe-2013-sarah
|
cutout: europe-2013-sarah
|
||||||
@ -114,7 +114,7 @@ renewable:
|
|||||||
corine: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
|
corine: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
|
||||||
14, 15, 16, 17, 18, 19, 20, 26, 31, 32]
|
14, 15, 16, 17, 18, 19, 20, 26, 31, 32]
|
||||||
natura: true
|
natura: true
|
||||||
potential: conservative # or heuristic
|
potential: simple # or conservative
|
||||||
clip_p_max_pu: 1.e-2
|
clip_p_max_pu: 1.e-2
|
||||||
hydro:
|
hydro:
|
||||||
cutout: europe-2013-era5
|
cutout: europe-2013-era5
|
||||||
|
@ -130,7 +130,9 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
p_nom_max_meth = config.get('potential', 'conservative')
|
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
|
# 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
|
# (min over all weather grid cells of the bus region) between the available
|
||||||
# potential (potmatrix) and the used normalised layout (layoutmatrix /
|
# 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)
|
# 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.
|
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
|
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:
|
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))
|
' not "{}"'.format(p_nom_max_meth))
|
||||||
|
|
||||||
layout = xr.DataArray(np.asarray(potmatrix.sum(axis=0)).reshape(cutout.shape),
|
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
|
del cs, cr
|
||||||
|
|
||||||
def clustering_for_n_clusters(n, n_clusters, aggregate_carriers=None,
|
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':
|
if potential_mode == 'simple':
|
||||||
p_nom_max_strategy = np.min
|
|
||||||
elif potential_mode == 'heuristic':
|
|
||||||
p_nom_max_strategy = np.sum
|
p_nom_max_strategy = np.sum
|
||||||
|
elif potential_mode == 'conservative':
|
||||||
|
p_nom_max_strategy = np.min
|
||||||
else:
|
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))
|
"but is '{}'".format(potential_mode))
|
||||||
|
|
||||||
clustering = get_clustering_from_busmap(
|
clustering = get_clustering_from_busmap(
|
||||||
|
Loading…
Reference in New Issue
Block a user