Sensitivity e nom max (#143)
* Update .gitignore * include e_nom_max sensitivity * remove change in gitignore * Update doc/release_notes.rst Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
This commit is contained in:
parent
b2872cc6b0
commit
3a6a1f90ab
@ -30,6 +30,7 @@ scenario:
|
|||||||
# B for biomass supply, I for industry, shipping and aviation
|
# B for biomass supply, I for industry, shipping and aviation
|
||||||
# solar+c0.5 reduces the capital cost of solar to 50\% of reference value
|
# solar+c0.5 reduces the capital cost of solar to 50\% of reference value
|
||||||
# solar+p3 multiplies the available installable potential by factor 3
|
# solar+p3 multiplies the available installable potential by factor 3
|
||||||
|
# co2 stored+e2 multiplies the potential of CO2 sequestration by a factor 2
|
||||||
# dist{n} includes distribution grids with investment cost of n times cost in data/costs.csv
|
# dist{n} includes distribution grids with investment cost of n times cost in data/costs.csv
|
||||||
# for myopic/perfect foresight cb states the carbon budget in GtCO2 (cumulative
|
# for myopic/perfect foresight cb states the carbon budget in GtCO2 (cumulative
|
||||||
# emissions throughout the transition path in the timeframe determined by the
|
# emissions throughout the transition path in the timeframe determined by the
|
||||||
|
@ -62,6 +62,8 @@ Future release
|
|||||||
* Distinguish costs for home battery storage and inverter from utility-scale battery costs.
|
* Distinguish costs for home battery storage and inverter from utility-scale battery costs.
|
||||||
|
|
||||||
|
|
||||||
|
* Include the option to alter the maximum energy capacity of a store via the ``carrier+factor`` in the ``{sector_opts}`` wildcard. This can be useful for sensitivity analyses. Example: ``co2 stored+e2`` multiplies the ``e_nom_max`` by factor 2. In this example, ``e_nom_max`` represents the CO2 sequestration potential in Europe.
|
||||||
|
|
||||||
|
|
||||||
PyPSA-Eur-Sec 0.5.0 (21st May 2021)
|
PyPSA-Eur-Sec 0.5.0 (21st May 2021)
|
||||||
===================================
|
===================================
|
||||||
|
@ -1925,14 +1925,19 @@ def maybe_adjust_costs_and_potentials(n, opts):
|
|||||||
suptechs = map(lambda c: c.split("-", 2)[0], carrier_list)
|
suptechs = map(lambda c: c.split("-", 2)[0], carrier_list)
|
||||||
if oo[0].startswith(tuple(suptechs)):
|
if oo[0].startswith(tuple(suptechs)):
|
||||||
carrier = oo[0]
|
carrier = oo[0]
|
||||||
attr_lookup = {"p": "p_nom_max", "c": "capital_cost"}
|
attr_lookup = {"p": "p_nom_max", "e": "e_nom_max", "c": "capital_cost"}
|
||||||
attr = attr_lookup[oo[1][0]]
|
attr = attr_lookup[oo[1][0]]
|
||||||
factor = float(oo[1][1:])
|
factor = float(oo[1][1:])
|
||||||
#beware if factor is 0 and p_nom_max is np.inf, 0*np.inf is nan
|
#beware if factor is 0 and p_nom_max is np.inf, 0*np.inf is nan
|
||||||
if carrier == "AC": # lines do not have carrier
|
if carrier == "AC": # lines do not have carrier
|
||||||
n.lines[attr] *= factor
|
n.lines[attr] *= factor
|
||||||
else:
|
else:
|
||||||
comps = {"Generator", "Link", "StorageUnit"} if attr == 'p_nom_max' else {"Generator", "Link", "StorageUnit", "Store"}
|
if attr == 'p_nom_max':
|
||||||
|
comps = {"Generator", "Link", "StorageUnit"}
|
||||||
|
elif attr = 'e_nom_max':
|
||||||
|
comps = {"Store"}
|
||||||
|
else:
|
||||||
|
comps = {"Generator", "Link", "StorageUnit", "Store"}
|
||||||
for c in n.iterate_components(comps):
|
for c in n.iterate_components(comps):
|
||||||
if carrier=='solar':
|
if carrier=='solar':
|
||||||
sel = c.df.carrier.str.contains(carrier) & ~c.df.carrier.str.contains("solar rooftop")
|
sel = c.df.carrier.str.contains(carrier) & ~c.df.carrier.str.contains("solar rooftop")
|
||||||
|
Loading…
Reference in New Issue
Block a user