add gas usage limit constraint
This commit is contained in:
parent
9812e64e82
commit
51dffbefa3
@ -39,6 +39,7 @@ enable:
|
||||
|
||||
electricity:
|
||||
voltages: [220., 300., 380.]
|
||||
gaslimit: false
|
||||
co2limit: 7.75e+7 # 0.05 * 3.1e9*0.5
|
||||
co2base: 1.487e+9
|
||||
agg_p_nom_limits: data/agg_p_nom_minmax.csv
|
||||
|
@ -77,6 +77,16 @@ def add_co2limit(n, co2limit, Nyears=1.):
|
||||
constant=co2limit * Nyears)
|
||||
|
||||
|
||||
def add_gaslimit(n, gaslimit, Nyears=1.):
|
||||
|
||||
sel = n.carriers.index.intersection(["OCGT", "CCGT", "CHP"])
|
||||
n.carriers.loc[sel, "gas_usage"] = 1.
|
||||
|
||||
n.add("GlobalConstraint", "GasLimit",
|
||||
carrier_attribute="gas_usage", sense="<=",
|
||||
constant=gaslimit * Nyears)
|
||||
|
||||
|
||||
def add_emission_prices(n, emission_prices={'co2': 0.}, exclude_co2=False):
|
||||
if exclude_co2: emission_prices.pop('co2')
|
||||
ep = (pd.Series(emission_prices).rename(lambda x: x+'_emissions') *
|
||||
@ -237,6 +247,10 @@ if __name__ == "__main__":
|
||||
add_co2limit(n, snakemake.config['electricity']['co2limit'], Nyears)
|
||||
break
|
||||
|
||||
gaslimit = snakemake.config["electricity"].get("gaslimit")
|
||||
if gaslimit:
|
||||
add_gaslimit(n, gaslimit, Nyears)
|
||||
|
||||
for o in opts:
|
||||
oo = o.split("+")
|
||||
suptechs = map(lambda c: c.split("-", 2)[0], n.carriers.index)
|
||||
|
Loading…
Reference in New Issue
Block a user