Ability to use timeseries profiles for finance calcs#725
Ability to use timeseries profiles for finance calcs#725elenya-grant merged 16 commits intoNatLabRockies:developfrom
Conversation
jaredthomas68
left a comment
There was a problem hiding this comment.
I like this, thanks for putting it together so quickly.
| # uniquely named outputs | ||
| commodity_output_desc = commodity_output_desc + f"_{finance_group_name}" | ||
|
|
||
| if finance_subgroups[subgroup_name]["use_commodity_stream_timeseries"]: |
johnjasa
left a comment
There was a problem hiding this comment.
Thanks for your quick and helpful response to @cfrontin's request, @elenya-grant! Really appreciate it. This is good to go from my end, I've just re-requested @jaredthomas68's review. Thanks again!
…RT into finance/ts_streams
|
I like the name Could you also add a test that ensures that |
@kbrunik - I updated the name to
|
jaredthomas68
left a comment
There was a problem hiding this comment.
One minor test adjustment needed.
The following is non-blocking:
I also think shifting to a nested approach for the "use_commodity_stream_timeseries" etc could help extend this capability to allow for degradation adjustment over time:
use_commodity_stream_timeseries:
commodity_stream_output: "name" # should default to None to make the boolean unnecessary
commodity_stream_degradation: 0.05 # decrease by 5% each year - note that I'm not set on naming or usage, just some thoughts.This would also make the boolean unnecessary.
jaredthomas68
left a comment
There was a problem hiding this comment.
Looks good. Thanks
Ability to use timeseries profiles for finance calcs
This PR attempts to resolve Issue #724.
The basis of this PR is that sometimes a user may want to calculate the finances using a timeseries profile. For example, it was not previously possible to calculate the LCOE using the
electricity_out1profile output from a splitter. This PR introduces the ability to use timeseries profiles with the finance models. This is done through an additional finance subsystem in the finance subgroup that is used upstream of the finance model. This new component is calledAdjustedCapacityFactorComp. The user can opt to use one this functionality in a finance subgroup by specifying two variables,use_commodity_stream_timeseriesandcommodity_stream_outputas shown below:This functionality is showcased in Example 17. Specific feedback for reviewers is outlined in Section 2.
Section 1: Type of Contribution
Section 2: Draft PR Checklist
TODO:
AdjustedCapacityFactorCompuse_commodity_stream_timeseriesis True butcommodity_stream_outputis not input.Type of Reviewer Feedback Requested (on Draft PR)
Structural feedback:
Implementation feedback:
Other feedback:
use_commodity_stream_timeseriesandcommodity_stream_output)?ShouldI intentionally includedcommodity_stream_namebecommodity_stream_output_name?use_commodity_stream_timeseries(although a lot of the logic in H2I could be handled with justcommodity_stream_output) because I wanted users to have to be very clear with what they're doing if they want to use this option.AdjustedCapacityFactorComp? Totally open to other naming suggestions.Section 3: General PR Checklist
docs/files are up-to-date, or added when necessaryCHANGELOG.md"A complete thought. [PR XYZ]((https://github.com/NatLabRockies/H2Integrate/pull/XYZ)", where
XYZshould be replaced with the actual number.Section 4: Related Issues
This would resolve issue #724
Section 5: Impacted Areas of the Software
Section 5.1: New Files
h2integrate/finances/test/test_finance_components.py: tests forAdjustedCapacityFactorCompSection 5.2: Modified Files
h2integrate/core/h2integrate_model.pycreate_finance_model(): Updated to see ifAdjustedCapacityFactorCompshould be added to the finance subgroup.connect_technologies(): Updated to handle connections to finance subgroup based on the commodity stream and whether to use the timeseries or the capacity factor.h2integrate/finances/finances.py: added new componentAdjustedCapacityFactorCompexamples/17_splitter_wind_doc_h2/plant_config.yaml: Added two finance subgroups to highlight this functionality.pytest examples/test/test_all_examples.py::test_splitter_wind_doc_h2_example: added subtests for the new finance subgroups, functions as an integration test.h2integrate/core/test/test_framework.py: added new testtest_use_commodity_stream_timeseries_finances_errordocs/user_guide/specifying_finance_parameters.md: updated documentationSection 6: Additional Supporting Information
Section 7: Test Results, if applicable