Skip to content

Commit ecaba60

Browse files
Implement predetermined energy capacity for storage, a parallel to predetermined power capacity. This is necessary for fully specifying existing storage projects.
1 parent 59ad400 commit ecaba60

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

examples/storage/inputs/gen_build_costs.tab

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ S-Geothermal 1998 5524200.0 0.0 .
44
S-Geothermal 2020 5524200.0 0.0 .
55
S-Central_PV-1 2020 2334300.0 41850.0 .
66
Battery_Storage 2020 10000.0 100.0 1000.0
7+
Battery_Storage 2010 10000.0 100.0 1000.0
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
GENERATION_PROJECT build_year gen_predetermined_cap
2-
S-Central_PV-1 2000 1
3-
S-Geothermal 1998 1
1+
GENERATION_PROJECT build_year gen_predetermined_cap gen_predetermined_storage_energy_mwh
2+
S-Central_PV-1 2000 1 .
3+
S-Geothermal 1998 1 .
4+
Battery_Storage 2010 1 4

switch_model/generators/extensions/storage.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ def define_components(mod):
5959
given investment period. This is only defined for storage technologies.
6060
Note that this describes the energy component and the overnight_cost
6161
describes the power component.
62+
63+
gen_predetermined_storage_energy_mwh[(g, bld_yr) in
64+
PREDETERMINED_GEN_BLD_YRS] is the amount of storage that has either been
65+
installed previously, or is slated for installation and is not a free
66+
decision variable. This is analogous to gen_predetermined_cap, but in
67+
units of energy of storage capacity (MWh) rather than power (MW).
6268
6369
BuildStorageEnergy[(g, bld_yr) in STORAGE_GEN_BLD_YRS]
6470
is a decision of how much energy capacity to build onto a storage
@@ -128,9 +134,19 @@ def define_components(mod):
128134
mod.STORAGE_GEN_BLD_YRS,
129135
within=NonNegativeReals)
130136
mod.min_data_check('gen_storage_energy_overnight_cost')
137+
mod.gen_predetermined_storage_energy_mwh = Param(
138+
mod.PREDETERMINED_GEN_BLD_YRS,
139+
within=NonNegativeReals)
140+
def bounds_BuildStorageEnergy(m, g, bld_yr):
141+
if((g, bld_yr) in m.gen_predetermined_storage_energy_mwh):
142+
return (m.gen_predetermined_storage_energy_mwh[g, bld_yr],
143+
m.gen_predetermined_storage_energy_mwh[g, bld_yr])
144+
else:
145+
return (0, None)
131146
mod.BuildStorageEnergy = Var(
132147
mod.STORAGE_GEN_BLD_YRS,
133-
within=NonNegativeReals)
148+
within=NonNegativeReals,
149+
bounds=bounds_BuildStorageEnergy)
134150

135151
# Summarize capital costs of energy storage for the objective function.
136152
mod.StorageEnergyInstallCosts = Expression(
@@ -240,6 +256,10 @@ def load_inputs(mod, switch_data, inputs_dir):
240256
gen_build_costs.tab
241257
GENERATION_PROJECT, build_year, ...
242258
gen_storage_energy_overnight_cost
259+
260+
gen_build_predetermined.tab
261+
GENERATION_PROJECT, build_year, ...,
262+
gen_predetermined_storage_energy_mwh*
243263
244264
"""
245265

@@ -262,6 +282,11 @@ def load_inputs(mod, switch_data, inputs_dir):
262282
filename=os.path.join(inputs_dir, 'gen_build_costs.tab'),
263283
auto_select=True,
264284
param=(mod.gen_storage_energy_overnight_cost))
285+
switch_data.load_aug(
286+
optional=True,
287+
filename=os.path.join(inputs_dir, 'gen_build_predetermined.tab'),
288+
auto_select=True,
289+
param=(mod.gen_predetermined_storage_energy_mwh))
265290

266291

267292
def post_solve(instance, outdir):

0 commit comments

Comments
 (0)