-
Notifications
You must be signed in to change notification settings - Fork 2
/
run_sensitivity_analysis_ccs.py
85 lines (68 loc) · 2.98 KB
/
run_sensitivity_analysis_ccs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# encoding: utf-8
#
# (c) Minh Ha-Duong 2017
# minh.haduong@gmail.com
# Creative Commons Attribution-ShareAlike 4.0 International
#
#
"""Assess an ensemble of scenarios."""
import sys
#from init import timefunc
from init import discountor
from plan_baseline import baseline
from plan_with_ccs import withCCS
from parameter_reference import reference
from Run import RunPair
HIDISCOUNT = reference._replace(DISCOUNT_RATE=.08)
HIDISCOUNT.__doc__ = "Discount 8%"
LODISCOUNT = reference._replace(DISCOUNT_RATE=.04)
LODISCOUNT.__doc__ = "Discount 4%"
HICARBONPRICE = reference._replace(CARBON_PRICE=reference.CARBON_PRICE * 1.75)
HICARBONPRICE.__doc__ = "175% carbon price"
# Coal prices on liberalized markets have been volaile.
# A 100% swing in one year is not exceptionnal
#
# This scenaro's falling 3% per year means division by ~3 from 2016 in 2050
cheapfossil_heat_price = reference.heat_price.copy()
cheapfossil_heat_price["Coal"] *= discountor(0.03)
cheapfossil_heat_price["Gas"] *= discountor(0.03)
LOCOALPRICE = reference._replace(heat_price=cheapfossil_heat_price)
LOCOALPRICE.__doc__ = "Coal and Gas price fall by 3% per year."
# Cost decrease in CCS technologies 1% per year (refernce assumes constant costs)
# -> in 2050 they are 71% of today's cost
# CoalCCS construction costs becomes equal to Coal construction cost in 2039
#
loCCS_construction_cost = reference.construction_cost.copy()
loCCS_construction_cost["CoalCCS"] *= discountor(0.018)
loCCS_construction_cost["GasCCS"] *= discountor(0.018)
loCCS_construction_cost["BioCCS"] *= discountor(0.018)
loCCS_fixed_operating_cost = reference.fixed_operating_cost.copy()
loCCS_fixed_operating_cost["CoalCCS"] *= discountor(0.018)
loCCS_fixed_operating_cost["GasCCS"] *= discountor(0.018)
loCCS_fixed_operating_cost["BioCCS"] *= discountor(0.018)
loCCS_variable_operating_cost = reference.variable_operating_cost.copy()
loCCS_variable_operating_cost["CoalCCS"] *= discountor(0.018)
loCCS_variable_operating_cost["GasCCS"] *= discountor(0.018)
loCCS_variable_operating_cost["BioCCS"] *= discountor(0.018)
LOCCSCOST = reference._replace(construction_cost=loCCS_construction_cost,
fixed_operating_cost=loCCS_fixed_operating_cost,
variable_operating_cost=loCCS_variable_operating_cost)
LOCCSCOST.__doc__ = "CCS construction and OM costs fall by 1.8% per year."
ENSEMBLE = [reference, HIDISCOUNT, LODISCOUNT, HICARBONPRICE, LOCOALPRICE, LOCCSCOST]
RUNPAIRS = [RunPair(baseline, withCCS, parameter) for parameter in ENSEMBLE]
if __name__ == '__main__':
if (len(sys.argv) == 2) and (sys.argv[1] == "summarize"):
print("""
******************************************
*** Ensemble of Results ***
******************************************
""")
for runpair in RUNPAIRS:
print(runpair.summary(["BAU", "ALT", "difference"]), "\n\n")
#@timefunc
#def speedtest():
# for runpair in RUNPAIRS:
# runpair.summary(["BAU", "ALT", "difference"])
#
#print()
#speedtest()