@@ -67,37 +67,45 @@ def add_many_tecs(scen, years, n=50):
67
67
"""add a range of dirty-to-clean technologies to the scenario"""
68
68
output_specs = ["node" , "comm" , "level" , "year" , "year" ]
69
69
70
- # tec: [emissions, var_cost, bound_activity_up]
70
+ # Add some hardcoded tecs for temporary testing
71
+ # tec: [emission_factor, var_cost, bound_activity_up]
71
72
# tecs = {
72
73
# "tec1": [10, 5, 1],
73
74
# "tec2": [-1, 10, 0.4],
74
75
# "tec3": [-5, 200, 0.3],
75
76
# "tec4": [-15, 1200, 0.2],
76
77
# "tec5": [-50, 6000, 0.1],
77
78
# }
78
- # tecs = {
79
- # "tec1": [10, 5, 1],
80
- # "tec2": [-10, 10, 0.4],
81
- # "tec3": [-12, 20, 0.3],
82
- # "tec4": [-14, 30, 0.2],
83
- # "tec5": [-16, 40, 0.1],
84
- # }
85
- for i in range (1 , n + 1 ):
86
- t = f"tec{ i } "
79
+ tecs = {
80
+ "tec1" : [10 , 5 , 1 ],
81
+ "tec2" : [- 10 , 10 , 0.4 ],
82
+ "tec3" : [- 12 , 20 , 0.3 ],
83
+ "tec4" : [- 14 , 30 , 0.2 ],
84
+ "tec5" : [- 16 , 40 , 0.1 ],
85
+ }
86
+ # This is the original and we want to convert back to it after testing:
87
+ # for i in range(1, n + 1):
88
+ # t = f"tec{i}"
89
+ # -----------------
90
+ for t in tecs :
87
91
scen .add_set ("technology" , t )
88
92
for y in years :
89
93
tec_specs = ["node" , t , y , y , "mode" ]
90
- # variable costs grow quadratically over technologies
91
- # to get rid of the curse of linearity
92
- c = (10 * i / n ) ** 2 * (1.045 ) ** (y - years [0 ])
93
- e = 1 - i / n
94
+ # This is the original, convert back after testing:
95
+ # # variable costs grow quadratically over technologies
96
+ # # to get rid of the curse of linearity
97
+ # c = (10 * i / n) ** 2 * (1.045) ** (y - years[0])
98
+ # e = 1 - i / n
99
+ # scen.add_par("var_cost", tec_specs + ["year"], c, "USD/GWa")
100
+ # scen.add_par("emission_factor", tec_specs + ["co2"], e, "tCO2")
101
+ # -------------
94
102
scen .add_par ("output" , tec_specs + output_specs , 1 , "GWa" )
95
- scen .add_par ("var_cost" , tec_specs + ["year" ], c , "USD/GWa" )
96
- scen .add_par ("emission_factor" , tec_specs + ["co2" ], e , "tCO2" )
97
103
98
- # scen.add_par("var_cost", tec_specs + ["year"], tecs[t][1], "USD/GWa")
99
- # scen.add_par("emission_factor", tec_specs + ["co2"], tecs[t][0], "tCO2")
100
- # scen.add_par("bound_activity_up", ["node", t, y, "mode", "year"], tecs[t][2], "GWa")
104
+ scen .add_par ("var_cost" , tec_specs + ["year" ], tecs [t ][1 ], "USD/GWa" )
105
+ scen .add_par ("emission_factor" , tec_specs + ["co2" ], tecs [t ][0 ], "tCO2" )
106
+ scen .add_par (
107
+ "bound_activity_up" , ["node" , t , y , "mode" , "year" ], tecs [t ][2 ], "GWa"
108
+ )
101
109
102
110
scen .add_set ("type_addon" , "mitigation" )
103
111
scen .add_set ("map_tec_addon" , ["tec1" , "mitigation" ])
0 commit comments