-
Notifications
You must be signed in to change notification settings - Fork 248
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
Conversation
…-pse into adam-a-a-price-taker-model
… functions to add constraints through pyomo blocks
…y argument for ramping func
@adowling2 @djlaky - we think this is in a good enough place to merge, and if there are no objections, would like to merge by the next dev call coming up. Please provide any review comments that you might have before the dev call on Thursday. We also plan to follow up with subsequent PRs to make certain refinements, such as adding a tutorial example, adding a clustering method, etc., so if any suggested changes come to mind, please consider whether they should be done in this PR or could be handled in a subsequent PR. Thanks in advance! |
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.
Two small things to address. Otherwise, it LGTM
# Test that axes were created | ||
assert plt.gca() is not None | ||
# Test that the plot has data | ||
# assert plt.gca().has_data() |
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.
Any reason why this test is commented out?
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.
It was a simple plot. I could see the data on the plot, but the assertion was failing for some unknown reason.
There isn't anything in the code that breaks it. So, I thought it would just be sufficient to run it for code coverage.
I commented it for now. I will see if I can fix it 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.
Just a small question otherwise this looks good to me
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.
LGTM- dropping my review even though this is merged already. My intention is to potentially cover some of these comments as we move forward with subsequent PRs @radhakrishnatg @MarcusHolly.
resource based on their respective bid curves. Advanced data analytics (RAVEN) reinterpret the LMP signals and PCM | ||
as stochastic realizations of the LMPs in the form of representative days (or simply the full-year price signals). | ||
In part 2, PRESCIENT uses a variety of input parameters (design capacity, minimum power output, ramp rate, minimum up/down time, marginal cost, no load cost, and startup profile) | ||
to generate data for the market surrogates. Meanwhile, IDAES uses the double loop simulation to integrate detailed | ||
process models (b, ii) into the daily (a, c) and hourly (i, iii) grid operations workflow. |
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.
Is this relevant specifically for the PriceTaker class as implemented in this 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.
Not really - I've trimmed down the "part 2" section, but still kept the image since I think it helps to get a holistic picture of the general workflow
# Detecting Knee Points in System Behavior | ||
# https://raghavan.usc.edu/papers/kneedle-simplex11.pdf | ||
|
||
return len(np.array(x)) + len(np.array(y)) |
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.
Not sure I understand this. This looks like it merely returns the sum of the length of input vars and length of output vars. When glancing at the paper, it appears to be more than that. How does the implementation boil down to this simple sum?
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.
I just removed this function in #1579 since I didn't think it was necessary
), | ||
) | ||
CONFIG.declare( | ||
"lmp_data", |
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.
a little unclear we why would want to have the option to append LMP data to the OperationModel as well as to the Pricetraker. Why not limit to only having LMP data on the Pricetaker?
num_representative_days: Optional[int], default=None | ||
number of clusters or representative periods. | ||
horizon_length: Optional[int], default=None |
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.
any reason why this isn't taken from the config?
|
||
# Perform domain validation (ConfigDict performs the validation) | ||
if self._config.lmp_data is None: | ||
assert len(lmp_data) >= 2 # Do not remove this check! |
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.
Shouldn't this raise an exception?
return get_optimal_num_clusters( | ||
daily_data, kmin, kmax, method, generate_elbow_plot, self._config.seed | ||
) |
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.
where does self._config.num_clusters really play a role?
for attribute in attribute_list: | ||
if not hasattr(blk, attribute): |
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.
attribute_list isn't used for anything else besides this hasattr check, so I am wondering why it's here. I suppose this might be the place to check for it before proceeding to subsequent code
Fixes
Compared to #1201, operational constraints mathematical form was corrected. Unnecessary functions were removed/merged. Additional user flexibility was added for constructing cost objectives.
Summary/Motivation:
Resurrecting #1201 to finish price taker framework in accordance with project milestones.
Framework allows the user to construct price-taker models for design and/or operational optimization considering time-varying market price data.
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: