Storage
E4ST.Storage
— Typemutable struct Storage <: Modification
Storage(;name, file, build_file="")
Storage is represented over sets of time-weighted sequential representative hours for which the following must hold true, for a given storage device:
- Net charge over the interval must equal zero.
- Total charge of the device cannot exceed its maximum charge, or go below zero.
- Initial charge over an interval can be anywhere between 0 and the maximum charge, and is the same initial charge for each time interval.
Arguments
name
- the name of theModification
.file
- the filename of the storage table, where each row represents a storage device. See alsosummarize_table(::Val{:storage})
build_file
- the filename of the buildable storage table, where each row represents a specification for buildable storage. See alsosummarize_table(::Val{:build_storage})
Variables Introduced
pcap_stor[stor_idx, yr_idx]
- The discharge power capacity, in MW, of the storage device.pcharge_stor[stor_idx, yr_idx, hr_idx]
- The charge power, in MW, for a given hour.pdischarge_stor[stor_idx, yr_idx, hr_idx]
- The discharged power, in MW, for a given hour.e0_stor[stor_idx, yr_idx, int_idx]
- The starting charge energy (in MWh) for each interval.
Constraints Introduced
cons_stor_charge_bal[stor_idx, yr_idx, int_idx]
- the charge balancing equation - net charge in each interval is 0cons_stor_charge_max[stor_idx, yr_idx, int_idx, _hr_idx]
- constrain the stored energy in each hour of each interval to be less than the maximum (function ofpcap_stor
and the discharge duration column of the storage table). Note_hr_idx
is the index within the interval, not the normalhr_idx
cons_stor_charge_min[stor_idx, yr_idx, int_idx, _hr_idx]
- constrain the stored energy in each hour of each interval to be greater than zero. Note_hr_idx
is the index within the interval, not the normalhr_idx
cons_pcap_stor_noadd[stor_idx, yr_idx; years[yr_idx] >= storage.year_on[stor_idx]]
- constrain the capacity to be non-increasing after being built. (only in multi-year simulations)cons_pcap_stor_prebuild[stor_idx, yr_idx; years[yr_idx] < storage.year_on[stor_idx]]
- fix the capacity to zero before being built. (should only happen in multi-year simulations)cons_pcap_stor_exog[stor_idx, yr_idx]
- constrain the exogenous, unbuilt capacity to equal pcap0 for the first year >= its build year.
Objective Terms
capex_obj_stor
- the capital expenditures to build the storage device, only non-zero in the build year. (function ofpcap_stor
andcapex
, andyear_on
)fom_stor
- the fixed operation and maintenance costs for the storage device (function ofpcap_stor
andfom
from the storage table)vom_stor
- the variable operation and maintenance costs for the storage device (function ofpdischarge_stor
, thevom
column of the storage table, and the hour weightsget_hour_weights
)
Power Balancing Equation
Each storage device can either be on the "gen" side or the "load" side, as specified by the side
column.
- "gen" side:
pcharge_stor
gets subtracted frompgen_bus
pdischarge_stor
gets added topgen_bus
- "load" side:
pcharge_stor
gets added toplserv_bus
pdischarge_stor
gets subtracted fromplserv_bus
E4ST.modify_raw_data!
— Methodmodify_raw_data!(mod::Modification, config, data, model)
Change the raw data with mod
.
E4ST.modify_setup_data!
— Methodmodify_setup_data!(mod::Modification, config, data, model)
Change the setup data with mod
.
E4ST.modify_model!
— Methodmodify_model!(mod::Modification, config, data, model)
Apply mod to the model, called in setup_model
E4ST.modify_results!
— Methodmodify_results!(mod::Storage, config, data)
Modify battery results. Add columns to the storage
table for:
pcap
- discharge capacity of the storage device, in MW.pcharge
- the charging rate, in MWpdischarge
- the discharging rate, in MWecharge
- the energy charged in each representative hour (including losses)edischarge
- Energy that was discharged by the storage deviceploss
- Power that was lost by the battery, counted as served load equal topcharge * (1-η)
eloss
- Energy that was lost by the battery, counted as served loadpcap_inv_sim
- power discharge capacity invested in the simecap_inv_sim
- 8760 * pcapinvsim
Also saves the updated storage table via save_updated_storage_table
.
E4ST.save_updated_storage_table
— Methodsave_updated_storage_table(config, data)
Saves the updated storage table with any additional storage units, updated capacities, etc.
E4ST.summarize_table
— Methodsummarize_table(::Val{:storage})
column_name | data_type | unit | required | description |
---|---|---|---|---|
bus_idx | Int64 | E4ST.NA | true | The index of the bus table that the storage device corresponds to |
status | Bool | E4ST.NA | false | Whether or not the storage device is in service |
build_status | InlineStrings.String15 | E4ST.NA | true | Whether the storage device is built , 'new , or unbuilt . All storage devices marked new when the storage file is read in will be changed to built . Can also be changed to retired_exog or retired_endog after the simulation is run. See update_build_status! |
build_type | AbstractString | E4ST.NA | true | Whether the storage device is 'real', 'exog' (exogenously built), or 'endog' (endogenously built) |
build_id | AbstractString | E4ST.NA | true | Identifier of the build row. For pre-existing storage devices not specified in the build file, this is usually left empty |
year_on | E4ST.YearString | E4ST.Year | true | The first year of operation for the storage device. (For new devices this is also the year it was built) |
year_unbuilt | E4ST.YearString | E4ST.Year | false | The latest year the generator was known not to be built. Defaults to year_on - 1. Used for past capex accounting. |
econ_life | Float64 | E4ST.NumYears | true | The number of years in the economic lifetime of the storage device. |
year_off | E4ST.YearString | E4ST.Year | true | The first year that the storage unit is no longer operating in the simulation, computed from the simulation. Leave as y9999 if an existing storage unit that has not been retired in the simulation yet. |
year_shutdown | E4ST.YearString | E4ST.Year | true | The forced (exogenous) shutdown year for the storage unit. |
pcap_inv | Float64 | E4ST.MWCapacity | true | Original invested nameplate power generation capacity for the storage device. This is the original invested capacity of exogenously built storage devices (even if there have been retirements ), and the original invested capacity in year_on for endogenously built storage devices. |
pcap0 | Float64 | E4ST.MWCapacity | true | Starting nameplate power discharge capacity for the storage device |
pcap_min | Float64 | E4ST.MWCapacity | true | Minimum nameplate power discharge capacity of the storage device (normally set to zero to allow for retirement) |
pcap_max | Float64 | E4ST.MWCapacity | true | Maximum nameplate power discharge capacity of the storage device |
vom | Float64 | E4ST.DollarsPerMWhGenerated | true | Variable operation and maintenance cost per MWh of energy discharged |
fom | Float64 | E4ST.DollarsPerMWCapacityPerHour | true | Hourly fixed operation and maintenance cost for a MW of discharge capacity |
capex | Float64 | E4ST.DollarsPerMWBuiltCapacityPerHour | true | Hourly capital expenditures for a MW of discharge capacity |
transmission_capex | Float64 | E4ST.DollarsPerMWBuiltCapacityPerHour | false | Hourly capital expenditures for the transmission supporting a MW of discharge capacity |
routine_capex | Float64 | E4ST.DollarsPerMWCapacityPerHour | true | Routine capital expenditures for a MW of discharge capacity |
past_invest_cost | Float64 | E4ST.DollarsPerMWCapacityPerHour | false | Investment costs per MW of initial capacity per hour, for past investments |
past_invest_subsidy | Float64 | E4ST.DollarsPerMWCapacityPerHour | false | Investment subsidies from govt. per MW of initial capacity per hour, for past investments |
duration_discharge | Float64 | E4ST.Hours | true | Number of hours to fully discharge the storage device, from full. |
duration_charge | Float64 | E4ST.Hours | false | Number of hours to fully charge the empty storage device from empty. (Defaults to equal duration_discharge ) |
storage_efficiency | Float64 | E4ST.MWhDischargedPerMWhCharged | true | The round-trip efficiency of the battery. |
side | String | E4ST.NA | true | The side of the power balance equation to add the charging/discharging to. Can be "gen" or "load" |
hour_groupby | String | E4ST.NA | true | The column of the hours table to group by. For example day |
hour_duration | String | E4ST.NA | true | The column of the hours table specifying the duration of each representatibe hour |
hour_order | String | E4ST.NA | true | The column of the hours table specifying the sequence of the hours. |
reg_factor | Float64 | E4ST.NA | true | The percentage of power that dispatches to a cost-of-service regulated market |
E4ST.summarize_table
— Methodsummarize_table(::Val{:build_storage})
column_name | data_type | unit | required | description |
---|---|---|---|---|
area | AbstractString | E4ST.NA | true | The area with which to filter by. I.e. "state". Leave blank to not filter by area. |
subarea | AbstractString | E4ST.NA | true | The subarea to include in the filter. I.e. "maryland". Leave blank to not filter by area. |
status | Bool | E4ST.NA | false | Whether or not the storage device is in service |
build_status | InlineStrings.String15 | E4ST.NA | true | Whether the storage device is built , 'new , or unbuilt . All storage devices marked new when the storage file is read in will be changed to built . Can also be changed to retired_exog or retired_endog after the simulation is run. See update_build_status! |
build_type | AbstractString | E4ST.NA | true | Whether the storage device is 'real', 'exog' (exogenously built), or 'endog' (endogenously built) |
build_id | AbstractString | E4ST.NA | true | Identifier of the build row. Each storage device made using this build spec will inherit this build_id |
year_on | E4ST.YearString | E4ST.Year | true | The first year of operation for the storage device. (For new devices this is also the year it was built) |
econ_life | Float64 | E4ST.NumYears | true | The number of years in the economic lifetime of the storage device. |
age_shutdown | Float64 | E4ST.NumYears | true | The age at which the storage device is no longer operating. I.e. if year_on = y2030 and age_shutdown = 20 , then capacity will be 0 in y2040 . |
year_on_min | E4ST.YearString | E4ST.Year | true | The first year in which a storage device can be built/come online (inclusive). Storage device with no restriction and exogenously built gens will be left blank |
year_on_max | E4ST.YearString | E4ST.Year | true | The last year in which a storage device can be built/come online (inclusive). Storage devices with no restriction and exogenously built gens will be left blank |
pcap0 | Float64 | E4ST.MWCapacity | true | Starting nameplate power discharge capacity for the storage device |
pcap_min | Float64 | E4ST.MWCapacity | true | Minimum nameplate power discharge capacity of the storage device (normally set to zero to allow for retirement) |
pcap_max | Float64 | E4ST.MWCapacity | true | Maximum nameplate power discharge capacity of the storage device |
vom | Float64 | E4ST.DollarsPerMWhGenerated | true | Variable operation and maintenance cost per MWh of energy discharged |
fom | Float64 | E4ST.DollarsPerMWCapacityPerHour | true | Hourly fixed operation and maintenance cost for a MW of discharge capacity |
capex | Float64 | E4ST.DollarsPerMWBuiltCapacityPerHour | true | Hourly capital expenditures for a MW of discharge capacity |
transmission_capex | Float64 | E4ST.DollarsPerMWBuiltCapacityPerHour | true | Hourly capital expenditures for the transmission supporting a MW of discharge capacity |
routine_capex | Float64 | E4ST.DollarsPerMWCapacityPerHour | true | Routing capital expenditures for a MW of discharge capacity |
duration_discharge | Float64 | E4ST.Hours | true | Number of hours to fully discharge the storage device, from full. |
duration_charge | Float64 | E4ST.Hours | false | Number of hours to fully charge the empty storage device from empty. (Defaults to equal duration_discharge ) |
storage_efficiency | Float64 | E4ST.MWhDischargedPerMWhCharged | true | The round-trip efficiency of the device. |
side | String | E4ST.NA | true | The side of the power balance equation to add the charging/discharging to. Can be "gen" or "load" |
hour_groupby | String | E4ST.NA | true | The column of the hours table to group by. For example day |
hour_duration | String | E4ST.NA | true | The column of the hours table specifying the duration of each representatibe hour |
hour_order | String | E4ST.NA | true | The column of the hours table specifying the sequence of the hours. |