adjustments to new due to clustering module
This commit is contained in:
parent
c7f67f0641
commit
9fbc626862
@ -621,14 +621,10 @@ clustering:
|
|||||||
exclude_carriers: []
|
exclude_carriers: []
|
||||||
aggregation_strategies:
|
aggregation_strategies:
|
||||||
generators:
|
generators:
|
||||||
p_nom_max: sum # use "min" for more conservative assumptions
|
p_nom_max: weighted_min
|
||||||
p_nom_min: sum
|
|
||||||
p_min_pu: mean
|
|
||||||
marginal_cost: mean
|
|
||||||
committable: any
|
committable: any
|
||||||
ramp_limit_up: max
|
ramp_limit_up: max
|
||||||
ramp_limit_down: max
|
ramp_limit_down: max
|
||||||
efficiency: mean
|
|
||||||
|
|
||||||
solving:
|
solving:
|
||||||
#tmpdir: "path/to/tmp"
|
#tmpdir: "path/to/tmp"
|
||||||
@ -775,6 +771,8 @@ plotting:
|
|||||||
H2: "Hydrogen Storage"
|
H2: "Hydrogen Storage"
|
||||||
lines: "Transmission Lines"
|
lines: "Transmission Lines"
|
||||||
ror: "Run of River"
|
ror: "Run of River"
|
||||||
|
ac: "AC"
|
||||||
|
dc: "DC"
|
||||||
|
|
||||||
tech_colors:
|
tech_colors:
|
||||||
# wind
|
# wind
|
||||||
|
@ -499,13 +499,6 @@ if __name__ == "__main__":
|
|||||||
Nyears,
|
Nyears,
|
||||||
).at["HVAC overhead", "capital_cost"]
|
).at["HVAC overhead", "capital_cost"]
|
||||||
|
|
||||||
def consense(x):
|
|
||||||
v = x.iat[0]
|
|
||||||
assert (
|
|
||||||
x == v
|
|
||||||
).all() or x.isnull().all(), "The `potential` configuration option must agree for all renewable carriers, for now!"
|
|
||||||
return v
|
|
||||||
|
|
||||||
custom_busmap = params.custom_busmap
|
custom_busmap = params.custom_busmap
|
||||||
if custom_busmap:
|
if custom_busmap:
|
||||||
custom_busmap = pd.read_csv(
|
custom_busmap = pd.read_csv(
|
||||||
|
@ -36,7 +36,11 @@ if __name__ == "__main__":
|
|||||||
# %%
|
# %%
|
||||||
|
|
||||||
def rename_index(ds):
|
def rename_index(ds):
|
||||||
return ds.set_axis(ds.index.map(lambda x: f"{x[1]}\n({x[0].lower()})"))
|
specific = ds.index.map(lambda x: f"{x[1]}\n({x[0].lower()})")
|
||||||
|
generic = ds.index.get_level_values("carrier")
|
||||||
|
duplicated = generic.duplicated(keep=False)
|
||||||
|
index = specific.where(duplicated, generic)
|
||||||
|
return ds.set_axis(index)
|
||||||
|
|
||||||
def plot_static_per_carrier(ds, ax, drop_zero=True):
|
def plot_static_per_carrier(ds, ax, drop_zero=True):
|
||||||
if drop_zero:
|
if drop_zero:
|
||||||
|
@ -256,8 +256,12 @@ def _aggregate_and_move_components(
|
|||||||
_, generator_strategies = get_aggregation_strategies(aggregation_strategies)
|
_, generator_strategies = get_aggregation_strategies(aggregation_strategies)
|
||||||
|
|
||||||
carriers = set(n.generators.carrier) - set(exclude_carriers)
|
carriers = set(n.generators.carrier) - set(exclude_carriers)
|
||||||
generators, generators_pnl = aggregategenerators(
|
generators, generators_pnl = aggregateoneport(
|
||||||
n, busmap, carriers=carriers, custom_strategies=generator_strategies
|
n,
|
||||||
|
busmap,
|
||||||
|
"Generator",
|
||||||
|
carriers=carriers,
|
||||||
|
custom_strategies=generator_strategies,
|
||||||
)
|
)
|
||||||
|
|
||||||
replace_components(n, "Generator", generators, generators_pnl)
|
replace_components(n, "Generator", generators, generators_pnl)
|
||||||
@ -602,14 +606,16 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
# some entries in n.buses are not updated in previous functions, therefore can be wrong. as they are not needed
|
# some entries in n.buses are not updated in previous functions, therefore can be wrong. as they are not needed
|
||||||
# and are lost when clustering (for example with the simpl wildcard), we remove them for consistency:
|
# and are lost when clustering (for example with the simpl wildcard), we remove them for consistency:
|
||||||
buses_c = {
|
remove = [
|
||||||
"symbol",
|
"symbol",
|
||||||
"tags",
|
"tags",
|
||||||
"under_construction",
|
"under_construction",
|
||||||
"substation_lv",
|
"substation_lv",
|
||||||
"substation_off",
|
"substation_off",
|
||||||
}.intersection(n.buses.columns)
|
"geometry",
|
||||||
n.buses = n.buses.drop(buses_c, axis=1)
|
]
|
||||||
|
n.buses.drop(remove, axis=1, inplace=True, errors="ignore")
|
||||||
|
n.lines.drop(remove, axis=1, errors="ignore", inplace=True)
|
||||||
|
|
||||||
update_p_nom_max(n)
|
update_p_nom_max(n)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user