fix emission prices (#171)

* fix emission prices

I'm not sure if the previous setup was intentional, but regarding that different generators might have different efficiencies and the emissions are carrier specific only, it makes more sense set net emission price.

* small fix

* update release_notes and config
This commit is contained in:
FabianHofmann 2020-08-25 12:12:00 +02:00 committed by GitHub
parent e2605a25dc
commit 04f19f214d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 5 deletions

View File

@ -179,7 +179,7 @@ costs:
hydro: 0.
H2: 0.
battery: 0.
emission_prices: # only used with the option Ep
emission_prices: # in currency per tonne emission, only used with the option Ep
co2: 0.
solving:

View File

@ -156,7 +156,7 @@ costs:
offwind: 0.015
H2: 0.
battery: 0.
emission_prices: # only used with the option Ep
emission_prices: # in currency per tonne emission, only used with the option Ep
co2: 0.
solving:

View File

@ -21,6 +21,8 @@ Upcoming Release
* Added Google Cloud Platform tutorial (for Windows users).
* Corrected setting of exogenous emission price (in config -> cost -> emission price). This was not weighted by the efficiency and effective emission of the generators. Fixed in `#171 <https://github.com/PyPSA/pypsa-eur/pull/171>`_.
PyPSA-Eur 0.2.0 (8th June 2020)
==================================

View File

@ -7,7 +7,7 @@
Prepare PyPSA network for solving according to :ref:`opts` and :ref:`ll`, such as
- adding an annual **limit** of carbon-dioxide emissions,
- adding an exogenous **price** of carbon-dioxide emissions (or other kinds),
- adding an exogenous **price** per tonne emissions of carbon-dioxide (or other kinds),
- setting an **N-1 security margin** factor for transmission line capacities,
- specifying a limit on the **cost** of transmission expansion,
- specifying a limit on the **volume** of transmission expansion, and
@ -85,8 +85,10 @@ def add_emission_prices(n, emission_prices=None, exclude_co2=False):
if exclude_co2: emission_prices.pop('co2')
ep = (pd.Series(emission_prices).rename(lambda x: x+'_emissions') *
n.carriers.filter(like='_emissions')).sum(axis=1)
n.generators['marginal_cost'] += n.generators.carrier.map(ep)
n.storage_units['marginal_cost'] += n.storage_units.carrier.map(ep)
gen_ep = n.generators.carrier.map(ep) / n.generators.efficiency
n.generators['marginal_cost'] += gen_ep
su_ep = n.storage_units.carrier.map(ep) / n.storage_units.efficiency_dispatch
n.storage_units['marginal_cost'] += su_ep
def set_line_s_max_pu(n):
# set n-1 security margin to 0.5 for 37 clusters and to 0.7 from 200 clusters