add_existing_baseyear.py: Add carrier to conventional generators
This commit is contained in:
parent
7abe928337
commit
ece21bfdfa
@ -139,18 +139,20 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs):
|
|||||||
("nuclear","uranium")]:
|
("nuclear","uranium")]:
|
||||||
try:
|
try:
|
||||||
if node in df.index and not np.isnan(df.loc[node, generator]):
|
if node in df.index and not np.isnan(df.loc[node, generator]):
|
||||||
n.add("Link",
|
#use madd so that we can insert the carrier attribute
|
||||||
bus_selected + " " + generator +"-" + grouping_year,
|
n.madd("Link",
|
||||||
bus0="EU " + carrier,
|
[bus_selected + " " + generator +"-" + grouping_year],
|
||||||
bus1=bus_selected,
|
bus0="EU " + carrier,
|
||||||
bus2="co2 atmosphere",
|
bus1=bus_selected,
|
||||||
marginal_cost=costs.at[generator,'efficiency']*costs.at[generator,'VOM'], #NB: VOM is per MWel
|
bus2="co2 atmosphere",
|
||||||
capital_cost=costs.at[generator,'efficiency']*costs.at[generator,'fixed'], #NB: fixed cost is per MWel
|
carrier=generator,
|
||||||
p_nom=df.loc[node, generator],
|
marginal_cost=costs.at[generator,'efficiency']*costs.at[generator,'VOM'], #NB: VOM is per MWel
|
||||||
efficiency=costs.at[generator,'efficiency'],
|
capital_cost=costs.at[generator,'efficiency']*costs.at[generator,'fixed'], #NB: fixed cost is per MWel
|
||||||
efficiency2=costs.at[carrier,'CO2 intensity'],
|
p_nom=df.loc[node, generator],
|
||||||
build_year=int(grouping_year),
|
efficiency=costs.at[generator,'efficiency'],
|
||||||
lifetime=costs.at[generator,'lifetime'])
|
efficiency2=costs.at[carrier,'CO2 intensity'],
|
||||||
|
build_year=int(grouping_year),
|
||||||
|
lifetime=costs.at[generator,'lifetime'])
|
||||||
except:
|
except:
|
||||||
print("No capacity installed around " + grouping_year + " of " + generator + " in node " + node)
|
print("No capacity installed around " + grouping_year + " of " + generator + " in node " + node)
|
||||||
|
|
||||||
@ -387,10 +389,3 @@ if __name__ == "__main__":
|
|||||||
add_heating_capacities_installed_before_baseyear(n, baseyear, grouping_years, ashp_cop, gshp_cop, time_dep_hp_cop, costs, default_lifetime)
|
add_heating_capacities_installed_before_baseyear(n, baseyear, grouping_years, ashp_cop, gshp_cop, time_dep_hp_cop, costs, default_lifetime)
|
||||||
|
|
||||||
n.export_to_netcdf(snakemake.output[0])
|
n.export_to_netcdf(snakemake.output[0])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user