-
Notifications
You must be signed in to change notification settings - Fork 27
Enable load following optimization dispatch with Pyomo #407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
genevievestarke
wants to merge
85
commits into
NatLabRockies:develop
Choose a base branch
from
genevievestarke:feature/pyomo_opt
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 53 commits
Commits
Show all changes
85 commits
Select commit
Hold shift + click to select a range
168766a
include code from usage: pyomo [-h] [--version]
jaredthomas68 df63126
include storage rule file
jaredthomas68 73f87d7
Merge remote-tracking branch 'origin/develop' into pyomo_opt
bayc 80782e1
Merge branch 'pyomo_opt' into feature/pyomo_opt
genevievestarke 6971220
Halfway there for pyomo opt
genevievestarke 5a2ce87
Add first objective function
genevievestarke c7923c4
Updated dispatch optimization framework - add hybrid dispatch rule
genevievestarke 38c929d
Merge remote-tracking branch 'origin/develop' into feature/pyomo_opt
bayc 03d7c1d
Adding hybrid linking constraints and connecting variables in pyomo m…
genevievestarke 9509748
Merge branch 'feature/pyomo_opt' of https://github.com/genevievestark…
bayc 5fa7165
Merge remote-tracking branch 'origin/develop' into feature/pyomo_opt
bayc 2194701
Merge remote-tracking branch 'origin/develop' into feature/pyomo_opt
bayc c2f1bbb
Final structural changes
genevievestarke 4d676fb
Fix import statement
genevievestarke 0c642d0
Fix imports and setter method
genevievestarke 22e411f
First draft of running code
genevievestarke efc2069
Update example
genevievestarke 8650683
Merge branch 'develop' into feature/pyomo_opt
kbrunik e947332
test
kbrunik 581e101
fix precommits
kbrunik 1dbb52b
Merge branch 'develop' into feature/pyomo_opt
johnjasa 4f2faea
Fixing merge errors
johnjasa 39ad186
Minor spelling changes
johnjasa ec3ad18
Update example
genevievestarke b1cc99b
Update controller problem state method from Elenya
genevievestarke 24cc0b8
Update example and changelog
genevievestarke abf9d49
Clean up pyomo storage baseclass file
genevievestarke a2da8b9
Merge branch 'develop' into feature/pyomo_opt
johnjasa 5a26e58
Cleanups to feature/pyomo opt (#2)
elenya-grant 72205b2
Enable heuristic dispatch to run with new pyomo changes
genevievestarke 5c16393
Clean up added files and example
genevievestarke 6de9803
Adding first tests - do not pass yet
genevievestarke dc059b9
Merge branch 'develop' into feature/pyomo_opt
genevievestarke 5d36008
Update docs and rename example
genevievestarke ba6d65d
Align naming with develop branch
genevievestarke bb8e7d8
Update Ex 02 and update pyomo_controllers with naming in develop
genevievestarke 6a1d050
updated other example tech configs
elenya-grant 57bf534
ran precommit on some files
elenya-grant 0acaa30
precommit on pyomo_controllers.py
elenya-grant e3d0315
Update test formatting
genevievestarke a509354
Update pyomo storage rule for test
genevievestarke 2342730
Fix SOC linking bug
genevievestarke c2604b6
Testing update - partial
genevievestarke 5f33847
Make new test for optimized pyomo dispatch
genevievestarke 363bfbf
Update optimal controller test
genevievestarke f42f935
Update test with new site definition
genevievestarke bfd4e9c
Merge branch 'develop' into feature/pyomo_opt
genevievestarke db32b3a
Update example for merging in develop
genevievestarke 2c6e461
Minor updates to optimized dispatch
johnjasa 75f9ff6
PR updates from comments
genevievestarke 1f6dfbb
Add last file after merge issue
genevievestarke d3802a9
Update example
genevievestarke 53a8da9
Made plots slightly larger
johnjasa 948f11d
Merge branch 'develop' into feature/pyomo_opt
johnjasa 99ad4d1
Merge branch 'develop' into feature/pyomo_opt
johnjasa 5a7ced1
Update h2integrate/control/control_strategies/controller_opt_problem_…
genevievestarke 1d7d659
Update h2integrate/control/control_strategies/controller_opt_problem_…
genevievestarke 7324fb1
Update h2integrate/control/control_rules/hybrid_rule.py
genevievestarke 028598e
Merge branch 'develop' into feature/pyomo_opt
johnjasa 297c149
Cleaning up pyomo_controllers
johnjasa 4b4a857
Updated docstrings and battery mentions
johnjasa 0471fa7
Initial init docs string and example update
genevievestarke e474c2c
Update note about incentivizing charging in objective function
genevievestarke fb85bc7
Update generation and load variable definitions
genevievestarke 40d5f57
Update docs/control/pyomo_controllers.md
genevievestarke 31a9bd4
Update doc strings for updated_initial_soc parameter
genevievestarke fbf290e
Make time_weighting_factor and round_digits not hardcoded
genevievestarke c8ee38f
remove round_digits from pyomo_rule_baseclass
genevievestarke 54885a7
Merging with develop
johnjasa 2f500e3
Updating controller names
johnjasa 9e1e9e9
Fixed name check for controllers
johnjasa d13e55c
Updated optimal controller test
johnjasa 6768934
remove unused properties
bayc e21b33f
Update example to run with new class definitions
genevievestarke 4e8ee73
Fix converter name in test
genevievestarke 8c23c1b
Fix ruff formatting
genevievestarke 0198e0d
Merge branch 'develop' into feature/pyomo_opt
johnjasa 617c030
Update doc strings for pyomo model classes
genevievestarke 695615b
Rename files to be more consistent and descriptive
genevievestarke 8c6dca8
Update comments in the init portions of dispatch for parameters
genevievestarke 16f6441
Merge branch 'develop' into feature/pyomo_opt
johnjasa b1242c6
Remove comment
genevievestarke d1dd047
Add doc strings to optimized dispatch config
genevievestarke f36429e
Give more details about DispatchProblemState class
genevievestarke 7e93ef3
Remove todo comments
genevievestarke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| name: "driver_config" | ||
| description: "This analysis runs a hybrid plant to dispatch storage optimally to meet an electrical load." | ||
|
|
||
| general: | ||
| folder_output: outputs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| name: "plant_config" | ||
| description: "This plant is located in TX, USA..." | ||
|
|
||
| sites: | ||
| site: | ||
| latitude: 35.2018863 | ||
| longitude: -101.945027 | ||
|
|
||
| resources: | ||
| wind_resource: | ||
| resource_model: "wind_toolkit_v2_api" | ||
| resource_parameters: | ||
| resource_year: 2012 | ||
|
|
||
| plant: | ||
| plant_life: 30 | ||
|
|
||
| # array of arrays containing left-to-right technology | ||
| # interconnections; can support bidirectional connections | ||
| # with the reverse definition. | ||
| # this will naturally grow as we mature the interconnected tech | ||
| technology_interconnections: [ | ||
| ["wind", "battery", "electricity", "cable"], | ||
| ] | ||
|
|
||
| # array of arrays containing left-to-right technology, technology doing the dispatching | ||
| # in this case, battery is connected to battery because there are controls rules for | ||
| # the battery and battery is controlling the dispatching | ||
| tech_to_dispatch_connections: [ | ||
| ["wind", "battery"], | ||
| ["battery", "battery"], | ||
| ] | ||
|
|
||
| resource_to_tech_connections: [ | ||
| # connect the wind resource to the wind technology | ||
| ['site.wind_resource', 'wind', 'wind_resource_data'], | ||
| ] | ||
|
|
||
| finance_parameters: | ||
| finance_groups: | ||
| commodity: "electricity" | ||
| finance_model: "ProFastComp" | ||
| model_inputs: | ||
| params: | ||
| analysis_start_year: 2032 | ||
| installation_time: 36 # months | ||
| inflation_rate: 0.0 # 0 for nominal analysis | ||
| discount_rate: 0.09 # nominal return based on 2024 ATB baseline workbook for land-based wind | ||
| debt_equity_ratio: 2.62 # 2024 ATB uses 72.4% debt for land-based wind | ||
| property_tax_and_insurance: 0.03 # p-tax https://www.house.mn.gov/hrd/issinfo/clsrates.aspx # insurance percent of CAPEX estimated based on https://www.nrel.gov/docs/fy25osti/91775.pdf | ||
| total_income_tax_rate: 0.257 # 0.257 tax rate in 2024 atb baseline workbook, value here is based on federal (21%) and state in MN (9.8) | ||
| capital_gains_tax_rate: 0.15 # H2FAST default | ||
| sales_tax_rate: 0.07375 # total state and local sales tax in St. Louis County https://taxmaps.state.mn.us/salestax/ | ||
| debt_interest_rate: 0.07 # based on 2024 ATB nominal interest rate for land-based wind | ||
| debt_type: "Revolving debt" # can be "Revolving debt" or "One time loan". Revolving debt is H2FAST default and leads to much lower LCOH | ||
| loan_period_if_used: 0 # H2FAST default, not used for revolving debt | ||
| cash_onhand_months: 1 # H2FAST default | ||
| admin_expense: 0.00 # percent of sales H2FAST default | ||
| capital_items: | ||
| depr_type: "MACRS" # can be "MACRS" or "Straight line" - MACRS may be better and can reduce LCOH by more than $1/kg and is spec'd in the IRS MACRS schedule https://www.irs.gov/publications/p946#en_US_2020_publink1000107507 | ||
| depr_period: 5 # years - for clean energy facilities as specified by the IRS MACRS schedule https://www.irs.gov/publications/p946#en_US_2020_publink1000107507 | ||
| cost_adjustment_parameters: | ||
| cost_year_adjustment_inflation: 0.025 # used to adjust modeled costs to target_dollar_year | ||
| target_dollar_year: 2022 | ||
| finance_subgroups: | ||
| all_electricity: | ||
| commodity: "electricity" | ||
| commodity_stream: "wind" # use all electricity generated from wind in finance calc | ||
| technologies: ["wind", "battery"] | ||
| dispatched_electricity: | ||
| commodity: "electricity" | ||
| commodity_stream: "battery" #use only dispatched electricity from battery in finance calc | ||
| technologies: ["wind", "battery"] |
7 changes: 7 additions & 0 deletions
7
examples/27_pyomo_optimized_dispatch/pyomo_optimized_dispatch.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| name: "H2Integrate_config" | ||
|
|
||
| system_summary: "This hybrid plant contains wind and battery storage technologies. The system is designed to dispatch storage optimally meet a specific electrical load." | ||
|
|
||
| driver_config: "driver_config.yaml" | ||
| technology_config: "tech_config.yaml" | ||
| plant_config: "plant_config.yaml" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After further reviewing the PR, I think there's some additions to the doc page that would really help with overall understanding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some responses to the comments above:
hybrid_rule. The ports define what variables are passed from the individual technology dispatch models to thehybrid_ruleproblem. "Arcs" are what actually form the connection between the ports. This means that the storage dispatch pyomo model has a port forsystem_production,hybrid_rulehas a port forsystem_production, and an arc connects these two endpoints to connect this variable across the pyomo models.hybrid_rulebecausehybrid_rulecurrently only works as an aggregator of models and only includes things that you would need access to all the individual pyomo models to know.