Closed danielolsen closed 3 years ago
Correct me if I'm wrong: there are two parameters that we need to extract for each storage expansion candidate: 1) capacity, which is specified within the group of generators, i.e. BuildGen
, and it gives the maximum input/output power of a storage device 2) energy, which is specified within the particular group "BuildStorageEnergy", and it gives the maximum energy that a specific storage device could store. What is the relationship of the same entry between different investment years? Are they cumulative values that we could take directly or deltas that we need to do a cumulative sum?
Correct me if I'm wrong: there are two parameters that we need to extract for each storage expansion candidate: 1) capacity, which is specified within the group of generators, i.e.
BuildGen
, and it gives the maximum input/output power of a storage device 2) energy, which is specified within the particular group "BuildStorageEnergy", and it gives the maximum energy that a specific storage device could store.
This is correct.
What is the relationship of the same entry between different investment years? Are they cumulative values that we could take directly or deltas that we need to do a cumulative sum?
This is a very good question! I don't know, but we have the same concerns for generation and transmission. Currently, we are processing the Switch results as if they are cumulative, but that could be wrong. It will need further investigation.
I added a couple more commits so that we can successfully call get_pg
even when there are some storage candidates in the inputs, and therefore storage dispatch in the results:
match_variables
and parse_timepoints
now have a new parameter value_name
, rather than hard-coding that the returned variable values are labaled "capacity"
(as we did when we originally set up extraction of grid build decisions).value_name="dispatch"
within SwitchExtract._get_parsed_data
Looks good to me. We can merge this once @YifanLi86 is happy.
Pull Request doc
Purpose
What the code is doing
recover_storage_buses
function which translates Switch storage expansion candidates into bus IDs (following the pattern from #101)split_plant_existing_expansion
function which separates a list of plant IDs into real and hypothetical (this was needed to fix a bug that popped up withinadd_gen_upgrades_to_grid
, when existing generators withPmax = 0
are present in the input data).extract_build_decisions
is expanded to return generation, transmission, and storage energy decisions.add_gen_upgrades_to_grid
, we make some small changes to indexing to ensure that we only process generator expansions (not storage, not existing generators).add_storage_upgrades_to_grid
, which does what's expected following the name.Testing
Tested manually on results files generated both with and without storage candidates.
Code used to prepare inputs with storage candidates:
To analyze the results:
For this example, there are storage results, as verified via:
But no storage capacity is build, so there is no storage added to the resulting Grid:
Time estimate
30 minutes.