4444rules (and the need to improve them)
4545https://www.caiso.com/Documents/Jan29_2016_Comments_2017Track1Proposals_ResourceAdequacyProgram_R14-10-010.pdf
4646
47+
48+ INPUT FILE FORMAT
49+ reserve_capacity_value.csv
50+ GEN, TIMEPOINT, gen_capacity_value
51+
52+ planning_reserve_requirement_zones.csv
53+ PLANNING_RESERVE_REQUIREMENTS, prr_cap_reserve_margin, prr_enforcement_timescale
54+
55+ generation_projects_info.csv
56+ ..., gen_can_provide_cap_reserves
57+
58+ planning_reserve_requirement_zones.csv
59+ PRR, ZONE
60+
4761"""
4862
4963import os
@@ -128,22 +142,29 @@ def define_components(model):
128142 will not reflect any DER activities.
129143 """
130144 model .PLANNING_RESERVE_REQUIREMENTS = Set (
131- doc = "Areas and times where planning reserve margins are specified." , dimen = 1
145+ doc = "Areas and times where planning reserve margins are specified." ,
146+ input_file = "planning_reserve_requirements.csv" ,
147+ dimen = 1 ,
132148 )
133149 model .PRR_ZONES = Set (
134150 dimen = 2 ,
151+ input_file = "planning_reserve_requirement_zones.csv" ,
135152 doc = (
136153 "A set of (prr, z) that describes which zones contribute to each "
137154 "Planning Reserve Requirement."
138155 ),
139156 )
140157 model .prr_cap_reserve_margin = Param (
141- model .PLANNING_RESERVE_REQUIREMENTS , within = PercentFraction , default = 0.15
158+ model .PLANNING_RESERVE_REQUIREMENTS ,
159+ within = PercentFraction ,
160+ input_file = "planning_reserve_requirements.csv" ,
161+ default = 0.15 ,
142162 )
143163 model .prr_enforcement_timescale = Param (
144164 model .PLANNING_RESERVE_REQUIREMENTS ,
145165 default = "period_peak_load" ,
146166 validate = lambda m , value , prr : value in ("all_timepoints" , "peak_load" ),
167+ input_file = "planning_reserve_requirements.csv" ,
147168 doc = (
148169 "Determines whether planning reserve requirements are enforced in "
149170 "each timepoint, or just timepoints with peak load (zone_demand_mw)."
@@ -199,6 +220,7 @@ def PRR_TIMEPOINTS_init(m):
199220 model .GENERATION_PROJECTS ,
200221 within = Boolean ,
201222 default = True ,
223+ input_file = "generation_projects_info.csv" ,
202224 doc = "Indicates whether a generator can provide capacity reserves." ,
203225 )
204226
@@ -220,6 +242,7 @@ def gen_capacity_value_default(m, g, t):
220242 # Previously domain was PercentFraction however we want to allow renewable factors greater than 1
221243 # or less than 0.
222244 within = Reals ,
245+ input_file = "reserve_capacity_value.csv" ,
223246 default = gen_capacity_value_default ,
224247 validate = lambda m , value , g , t : (
225248 value == 0.0 if not m .gen_can_provide_cap_reserves [g ] else True
@@ -299,42 +322,3 @@ def define_dynamic_components(model):
299322 "of REQUIREMENTS_FOR_CAPACITY_RESERVES for each of PRR_TIMEPOINTS."
300323 ),
301324 )
302-
303-
304- def load_inputs (model , switch_data , inputs_dir ):
305- """
306- reserve_capacity_value.csv
307- GEN, TIMEPOINT, gen_capacity_value
308-
309- planning_reserve_requirement_zones.csv
310- PLANNING_RESERVE_REQUIREMENTS, prr_cap_reserve_margin, prr_enforcement_timescale
311-
312- generation_projects_info.csv
313- ..., gen_can_provide_cap_reserves
314-
315- planning_reserve_requirement_zones.csv
316- PRR, ZONE
317-
318- """
319- switch_data .load_aug (
320- filename = os .path .join (inputs_dir , "reserve_capacity_value.csv" ),
321- optional = True ,
322- auto_select = True ,
323- param = (model .gen_capacity_value ),
324- )
325- switch_data .load_aug (
326- filename = os .path .join (inputs_dir , "planning_reserve_requirements.csv" ),
327- auto_select = True ,
328- index = model .PLANNING_RESERVE_REQUIREMENTS ,
329- param = (model .prr_cap_reserve_margin , model .prr_enforcement_timescale ),
330- )
331- switch_data .load_aug (
332- filename = os .path .join (inputs_dir , "generation_projects_info.csv" ),
333- auto_select = True ,
334- optional_params = ["gen_can_provide_cap_reserves" ],
335- param = (model .gen_can_provide_cap_reserves ),
336- )
337- switch_data .load_aug (
338- filename = os .path .join (inputs_dir , "planning_reserve_requirement_zones.csv" ),
339- set = model .PRR_ZONES ,
340- )
0 commit comments