-
Notifications
You must be signed in to change notification settings - Fork 234
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
base: main
Are you sure you want to change the base?
Conversation
…-pse into adam-a-a-price-taker-model
… functions to add constraints through pyomo blocks
…y argument for ramping func
… into djlaky-price-taker-model
@MarcusHolly @djlaky, we need an update on this. |
We're going back to working on this. Hopefully it can be merged this month |
@djlaky @MarcusHolly what's the news on this? |
It's being looked at (and hopefully finished) for this month |
@andrewlee94 Would you be able to give this PR another review. I've addressed most of your specific comments, and some of your above feedback has already been addressed. The rest can be covered in subsequent PR(s). Namely, the remaining action items are to add a demonstration/how-to, add a distinct test file for design_and_operation_model.py, and add more test(s) for methods in isolation |
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 am still not sure what some of the code here is for and why it is needed, and the existing docs do not really explain this. Thus, I am hesitant to approve this as-is in part because this suggests there might need to be more design discussion and secondly because with the existing documentation I am not confident of the maintainability of the code.
docs/reference_guides/apps/grid_integration/multiperiod/Price_Taker.rst
Outdated
Show resolved
Hide resolved
@declare_process_block_class("DesignModel") | ||
class DesignModelData(ProcessBlockData): | ||
""" | ||
Class for containing design model ... |
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 still do not know enough about what this class actually does to approve this. The docs do not explain what this is or how to use it, and I am not sure what this code actually adds (i.e. is it even necessary?).
For one, this needs a descriptive doc string to explain what it does.
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.
@radhakrishnatg would be the best person to respond to this.
idaes/apps/grid_integration/multiperiod/design_and_operation_models.py
Outdated
Show resolved
Hide resolved
except: | ||
have_skl = False | ||
try: | ||
from kneed import KneeLocator |
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.
Are these existing dependencies, or are they adding new dependencies we need to be able to handle? If these are new dependencies, then this needs to be discussed in more detail (i.e. a meeting).
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.
@lbianchi-lbl FYI
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.
These are new dependencies. Linking to a previous discussion that explains the changes in setup.py: #1201 (comment). If there is a better way to go about this, let us know.
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.
For optional dependencies, you can look into attempt_import()
from pyomo.common.dependencies
that streamlines the syntax a bit. You should be able to find usage examples in the IDAES codebase and/or Pyomo docs.
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.
@lbianchi-lbl Can you provide a bit more context about optional dependencies? For this model, having access to a k-means clustering function is necessary, so what would be the purpose of an attempt_import()
. In other words, if the import attempt failed, we would just have to display an error message saying something along the lines of "Install dependency XYZ". In which case, would there really be any difference between optional dependencies and actual dependencies?
@adam-a-a @radhakrishnatg Leaving a comment here so that we remember to discuss next week whether or not the scipy tools will suffice or if we want to go through the hurdle of adding additional dependencies with sklearn (scikit-learn) |
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: