-
Notifications
You must be signed in to change notification settings - Fork 235
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
Price taker model for DISPATCHES, Rehashed #1358
Open
djlaky
wants to merge
140
commits into
IDAES:main
Choose a base branch
from
djlaky:price-taker-model
base: main
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 3 commits
Commits
Show all changes
140 commits
Select commit
Hold shift + click to select a range
a3d688c
Added basic price-taker framework
radhakrishnatg 67ce6a2
run black
adam-a-a e716c36
add in get_optimal_n_clusters as separate method. hand off to Marcus
adam-a-a e3788fb
Add methods for computing the optimal # of clusters and making an elb…
MarcusHolly 8ef54be
Merge branch 'main' into adam-a-a-price-taker-model
MarcusHolly f154700
Merge branch 'main' into price-taker-model
lbianchi-lbl 422d0ba
add fom to typos.toml in github/workflows to pass spellcheck
adam-a-a 2f36bbb
fix typo
adam-a-a 0aa1034
Add tests for new functions (excel import failing)
MarcusHolly 9042e5c
Update dependencies
MarcusHolly 5549028
Merge branch 'price-taker-model' of https://github.com/adam-a-a/idaes…
MarcusHolly 2fde47f
Add pytest marks
MarcusHolly d0a6c13
Fix typo where TimeStep data was being used instead of BaseCaseTax
MarcusHolly e5f6c07
Update test file
MarcusHolly 56d9369
Add warning for when kmax is not set
MarcusHolly 9b5edd4
Address Radha's comments and start adding testing (WIP)
MarcusHolly 948f40c
Add more tests
MarcusHolly 30fed63
Add cluster_lmp_data function
MarcusHolly fc43a3f
linearizing su_sd cosntraints and fixing the price traker model
4170501
Removing files that were mistakenly saved on this branch
1d87aea
modified startup and shutdown constraint function
4710a10
add set_period to startup and shutdown func
be68154
developed a function to add startup/shutdown constraints
66db0d8
Constructed a function that adds startup and shutdown constraints
b39f4d9
Added deepgetattr function and had the ramp-up/down and start-up/down…
799ed0b
linearized ramping constraints
7625d07
Added auxiliary variables
0c2c461
added a third mccor constraint for each aux var and created a capacit…
16710a6
changed startup_shutdown constraints to have the shutdown binary var
4518240
changed rule for min_start_up constraint
35ddead
fixed startup_shutdown function constraints, changed default values f…
fd15af9
added new method for adding aux variables
b84ea43
removed aux variable delcaration and added a new config option to opt…
15ea641
added comments
53e427e
small addition
14ee544
added design_blk
4e10801
added deepgetattr and constraint for the add capacity aux var func
d68d8fd
finished the new method and ramping function
6cd966e
Allowed _add_capacity_aux_vars to be cosntructed when the build func…
f7e3245
added a for loop that calls on the _add_capacity_aux_vars function t …
b223cf6
Pulling Tyler\'s brnach
56f8099
Updating PT model for SOFC case study
48d4d98
Updated price_taker_model.py doc
djlaky fde3f31
Updated init of PriceTakerModel
djlaky 5bd0d5b
Added missing documentation
djlaky 0df8b45
Corrected constraint expressions
djlaky fd595b4
Added tests for input checking
djlaky a54c3ac
Updated checks for get_optimal_clusters
djlaky 70cbaba
Fixed typos in test_price_taker.py
djlaky 85b7bd0
Added input checks on add_ramping_constraints
djlaky 9851b88
Fixed broken test
djlaky 6ede14e
Added automated LMP population
djlaky d31b272
Fixed getitem issues with Sets
djlaky 769ba7b
Removed redundant set definition
djlaky 0bba4d2
Added n_clusters check in append_lmp_data
djlaky b06d467
Reorganizing unit logging messages tests
djlaky 0cf82bf
Moved deepgetattr to import from design_and_operation_models.py
djlaky 6af8c9e
Added checks and tests
djlaky 1fc5f53
Updated data processing workflow
djlaky e991392
Small update to append_lmp_data
djlaky f2725cc
Updated get_optimal_n_clusters
djlaky 522023b
Updated cash flow construction
djlaky 22dbe12
Added tests for cashflows
djlaky 6dbb183
Fixed typos and ran black
djlaky 7a86d03
Run black
djlaky 7a24fba
Fixed some broken tests
djlaky b1629eb
Removed a test that is failing
djlaky d193e65
Reverted pytests.ini and corrected tests
djlaky fb543c7
Updated plotting test
djlaky 460af99
Ran Black again
djlaky c90bbe1
Merge branch 'IDAES:main' into price-taker-model
djlaky 643707f
Updating tests
djlaky 8aa02c6
Add capacity limits function
djlaky 323e4a9
Added final docstring
djlaky 04d07ae
Ran black
djlaky 4ae5779
Bugfix capacity constraints
djlaky 893743d
Removed multiyear LMP support
djlaky 82f8bdc
Merge branch 'IDAES:main' into price-taker-model
djlaky ebdc1b2
Delete idaes/apps/grid_integration/multiperiod/ERCOT_WEST_2022_shutdo…
djlaky aad41fb
Update docstring for n_clusters
djlaky e2dac86
Fixed typos.
djlaky 5ad727e
Removed design_blk as an input for Operation_Model
djlaky 2ae4635
Fixed typo in error message in tests
djlaky 8762f7b
Replace deepgetattr with find_component()
djlaky 7110dea
Changed dependence of tests on .xlsx to .csv
djlaky 8550569
Merge branch 'IDAES:main' into price-taker-model
djlaky 69c3c9b
Changed deepgetattr functionality to find_component
djlaky 177618c
Merge branch 'price-taker-model' of https://github.com/dlakes94/idaes…
djlaky ce4b0fb
Updated test to remove .xlsx dependencies
djlaky 343d191
Update on build_hourly_cashflows docstring
djlaky cec302e
Update for Sphinx again
djlaky 652d1cc
Ran black
djlaky d8ade5d
Updated SkeletonUnitModelData to ProcessBlockData
djlaky cd3f3d3
Made sklearn and kneed optional, added log msgs
djlaky ce6b3db
Updated tests for price taker class
djlaky f4cfbdb
Fixed optional import tests
djlaky cbd7aaa
Ran black
djlaky f10ea59
Bugfix kmeans for LMP
djlaky 46a3331
merged idaes main
7bdd94d
Revert "merged idaes main"
djlaky 1c85981
Add initial documentation for pricetaker
MarcusHolly 6956d73
Add autoclass to documentation
MarcusHolly 8b4b479
Address merge conflict
MarcusHolly 646b88b
Fix typos in documentation
MarcusHolly a1f1eb2
Reformat how math equations are handled
MarcusHolly 8101448
add subtle additions to price-taker model used in workhop
adam-a-a d8de0dd
Merge branch 'main' into price-taker-model
adam-a-a fc7369e
Test for seed instance and seed ValueError
MarcusHolly 75a56f4
Check for expected string outputs rather than using f-strings
MarcusHolly df687af
Separate tests that check for multiple error messages
MarcusHolly 47b66c5
Separate a majority of the code outside of the pytest.raises
MarcusHolly 8ac5987
Update imports
MarcusHolly d10b9a7
Merge branch 'main' into price-taker-model
MarcusHolly 1e7842a
Add version check for sklearn
MarcusHolly 8b1393a
Add separate function & test for generating elbow plots
MarcusHolly 6481545
Refines version testing and # of optimal clusters testing
MarcusHolly b9f3ef4
Remove unused imports
MarcusHolly bd2db6f
Merge branch 'price-taker-model' of https://github.com/djlaky/idaes-p…
MarcusHolly 9cf4a3a
Merge branch 'main' into djlaky-price-taker-model
MarcusHolly 112761f
Correct acronym in pricetaker documentation
MarcusHolly fb0a05b
Remove commented code in design_and_operation_models
MarcusHolly 5d960a4
Add dependencies for scikit-learn and kneed
MarcusHolly d7a0002
Update imports and seed.setter method
MarcusHolly 727be78
Resolve test failures
MarcusHolly aebe5b8
Update pricetaker to not create new dependencies
MarcusHolly 411bb60
Update pricetaker testing based on previous commit
MarcusHolly bd3244c
Refine docstring for compute_sse method
MarcusHolly b8149b5
Make compute_sse a prviate method & move outside of class
MarcusHolly 043ac34
Update compute_sse docstring
MarcusHolly 2cd22e4
Added tests for design and operation model classes
radhakrishnatg e9ff144
repair failing check by updating config option name; also update exce…
adam-a-a 422ec6e
black
adam-a-a 042a1d9
add more exception handling
adam-a-a 0fd8edb
Update docs/reference_guides/apps/grid_integration/multiperiod/Price_…
MarcusHolly 892e555
Merge branch 'main' into price-taker-model
adam-a-a a2c97c4
blk
adam-a-a 20db58f
try to fix docstrings to mitigate sphinx error
adam-a-a a4620de
Remove unnecessary f-strings
MarcusHolly a1ae6b7
Remove/re-add commented code in price taker testing
MarcusHolly bef17fb
Add logger messages for when model_func is not defined
MarcusHolly 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 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 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 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
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.
This is not something for this PR, but one thing I have wanted to comment on for a while is to make sure that the DISPATCHES team is aware the IDAES steady-state flowsheets support time indexing.
I do not think this tool has been using this capability, and it might help simplify things (or conversely make things more complicated). However, this would allow you to e.g. initialize all states (StateBlocks) in the multi-period model in one go using the existing initialization frameworks.
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.
We will note this for our continued development, thank you.
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.
@andrewlee94 Thank you for the note! I was not aware of time indexing. In DISPATCHES, we create one instance of the flowsheet, initialize it and
clone
it. Also, in most cases, models tend be linear/quadratic, so initialization is not needed. If we want to use the time index, then I believe we have to make a lot of changes to theMultiPeriodModel
class. Maybe for another PR.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.
Definitely another PR.
For reference, state block initialization will handle the indexing just fine and will initialize all time points in one go for you. @Robbybp also has some dynamic initialization tools that copy results from one state to another that might work here as well.
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.
Yes, I have some tools in
pyomo-mpc
for working with dynamic models. These should be useful for working with time-indexed steady state flowsheets, as this is very close to the use case they were designed for. To my basic understanding,MultiPeriodModel
and the related tooling in Dispatches seems like they are solving a similar problem from a different angle.