Adaptations to match current PyPSA-Eur version
This commit is contained in:
parent
520f7e440e
commit
9c6c6d243f
@ -173,9 +173,9 @@ if config['enable'].get('retrieve_cost_data', True):
|
|||||||
params:
|
params:
|
||||||
year = config['costs']['year'],
|
year = config['costs']['year'],
|
||||||
version = config['costs']['version'],
|
version = config['costs']['version'],
|
||||||
input: HTTP.remote("raw.githubusercontent.com/PyPSA/technology-data/{params.version}/outputs/costs_{params.year}.csv", keep_local=True)
|
input: HTTP.remote(f"raw.githubusercontent.com/PyPSA/technology-data/{params.version}/outputs/costs_{params.year}.csv", keep_local=True)
|
||||||
output: COSTS
|
output: COSTS
|
||||||
shell: 'mv {input} {output}'
|
run: move(input[0], output[0])
|
||||||
|
|
||||||
rule build_renewable_profiles:
|
rule build_renewable_profiles:
|
||||||
input:
|
input:
|
||||||
|
@ -159,7 +159,7 @@ load:
|
|||||||
costs:
|
costs:
|
||||||
year: 2030
|
year: 2030
|
||||||
version: v0.1.0
|
version: v0.1.0
|
||||||
rooftop_share: 0.5
|
rooftop_share: 0.14
|
||||||
fill_values:
|
fill_values:
|
||||||
FOM: 0
|
FOM: 0
|
||||||
VOM: 0
|
VOM: 0
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
Cost Assumptions
|
Cost Assumptions
|
||||||
##################
|
##################
|
||||||
|
|
||||||
The database of cost assumptions is retrieved from the repository `PyPSA/technology-data <https://github.com/pypsa/technology-data>`_ and then saved to``resources/costs.csv``.
|
The database of cost assumptions is retrieved from the repository `PyPSA/technology-data <https://github.com/pypsa/technology-data>`_ and then saved to``resources/costs.csv``. Cost assumptions of previous PyPSA-Eur versions can be restored by setting in the ``Snakefile``: ``COSTS="data/costs.csv".
|
||||||
|
|
||||||
The ``config.yaml` provides options to choose a reference year (``costs: year:``) and use a specific version of the repository ``costs: version:``.
|
The ``config.yaml`` provides options to choose a reference year (``costs: year:``) and use a specific version of the repository ``costs: version:``.
|
||||||
|
|
||||||
It includes cost assumptions for all included technologies for specific
|
It includes cost assumptions for all included technologies for specific
|
||||||
years from various sources, namely for
|
years from various sources, namely for
|
||||||
|
@ -169,7 +169,7 @@ def load_costs(tech_costs, config, elec_config, Nyears=1.):
|
|||||||
costs_for_storage(costs.loc["battery storage"], costs.loc["battery inverter"],
|
costs_for_storage(costs.loc["battery storage"], costs.loc["battery inverter"],
|
||||||
max_hours=max_hours['battery'])
|
max_hours=max_hours['battery'])
|
||||||
costs.loc["H2"] = \
|
costs.loc["H2"] = \
|
||||||
costs_for_storage(costs.loc["hydrogen storage tank"], costs.loc["fuel cell"],
|
costs_for_storage(costs.loc["hydrogen storage underground"], costs.loc["fuel cell"],
|
||||||
costs.loc["electrolysis"], max_hours=max_hours['H2'])
|
costs.loc["electrolysis"], max_hours=max_hours['H2'])
|
||||||
|
|
||||||
for attr in ('marginal_cost', 'capital_cost'):
|
for attr in ('marginal_cost', 'capital_cost'):
|
||||||
|
@ -76,28 +76,19 @@ def attach_storageunits(n, costs, elec_opts):
|
|||||||
lookup_dispatch = {"H2": "fuel cell", "battery": "battery inverter"}
|
lookup_dispatch = {"H2": "fuel cell", "battery": "battery inverter"}
|
||||||
|
|
||||||
for carrier in carriers:
|
for carrier in carriers:
|
||||||
if carrier=="battery":
|
roundtrip_correction = 0.5 if carrier == "battery" else 1
|
||||||
n.madd("StorageUnit", buses_i, ' ' + carrier,
|
|
||||||
bus=buses_i,
|
n.madd("StorageUnit", buses_i, ' ' + carrier,
|
||||||
carrier=carrier,
|
bus=buses_i,
|
||||||
p_nom_extendable=True,
|
carrier=carrier,
|
||||||
capital_cost=costs.at[carrier, 'capital_cost'],
|
p_nom_extendable=True,
|
||||||
marginal_cost=costs.at[carrier, 'marginal_cost'],
|
capital_cost=costs.at[carrier, 'capital_cost'],
|
||||||
efficiency_store=costs.at[lookup_store[carrier], 'efficiency']**0.5,
|
marginal_cost=costs.at[carrier, 'marginal_cost'],
|
||||||
efficiency_dispatch=costs.at[lookup_dispatch[carrier], 'efficiency']**0.5,
|
efficiency_store=costs.at[lookup_store[carrier], 'efficiency']**roundtrip_correction,
|
||||||
max_hours=max_hours[carrier],
|
efficiency_dispatch=costs.at[lookup_dispatch[carrier], 'efficiency']**roundtrip_correction,
|
||||||
cyclic_state_of_charge=True)
|
max_hours=max_hours[carrier],
|
||||||
else:
|
cyclic_state_of_charge=True
|
||||||
n.madd("StorageUnit", buses_i, ' ' + carrier,
|
)
|
||||||
bus=buses_i,
|
|
||||||
carrier=carrier,
|
|
||||||
p_nom_extendable=True,
|
|
||||||
capital_cost=costs.at[carrier, 'capital_cost'],
|
|
||||||
marginal_cost=costs.at[carrier, 'marginal_cost'],
|
|
||||||
efficiency_store=costs.at[lookup_store[carrier], 'efficiency'],
|
|
||||||
efficiency_dispatch=costs.at[lookup_dispatch[carrier], 'efficiency'],
|
|
||||||
max_hours=max_hours[carrier],
|
|
||||||
cyclic_state_of_charge=True)
|
|
||||||
|
|
||||||
|
|
||||||
def attach_stores(n, costs, elec_opts):
|
def attach_stores(n, costs, elec_opts):
|
||||||
|
@ -157,7 +157,7 @@ load:
|
|||||||
costs:
|
costs:
|
||||||
year: 2030
|
year: 2030
|
||||||
version: v0.1.0
|
version: v0.1.0
|
||||||
rooftop_share: 0.5
|
rooftop_share: 0.14
|
||||||
fill_values:
|
fill_values:
|
||||||
FOM: 0
|
FOM: 0
|
||||||
VOM: 0
|
VOM: 0
|
||||||
|
Loading…
Reference in New Issue
Block a user