-
Notifications
You must be signed in to change notification settings - Fork 68
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
Buy policy can cycle back and forth between actively buying and dormant based on time step #1596
Conversation
If you rebase this, @nuclearkatie, we can see if the new tests pass |
d648ee4
to
9c1517c
Compare
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 couple of little changes. I also wonder if we can add a test or two to the existing unit testing?
…e conditionsUpdate src/toolkit/matl_buy_policy.cc Co-authored-by: Paul Wilson <paul.wilson@wisc.edu> Signed-off-by: Katie Mummah <radioactivekate@gmail.com>
8645a53
to
cb75553
Compare
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 looks pretty good - a few final comments.
In addition to adding a test for the active/dormant buying policy, I expanded the one main test ( I find it easier as a developer to have multiple smaller tests of one concept each than one larger test that is checking for multiple stacking concepts (sending a request, sending requests for multiple commodities, quantizing requests). At least, this makes it faster/easier to determine which part of the pre-existing code I broke. |
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.
Looks good to me, thanks @nuclearkatie
Two new buy policy parameters,
active
anddormant
. Both are integers representing a number of time steps.active
part of the cycle, buying behavior is unchangeddormant
, agent will not request any new material from DRE