-
-
Notifications
You must be signed in to change notification settings - Fork 199
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
Separate FrameModel from FrameAgentType #1117
Conversation
…mplemented in the PortfolioFrameModel
Codecov Report
@@ Coverage Diff @@
## master #1117 +/- ##
==========================================
+ Coverage 73.83% 73.95% +0.12%
==========================================
Files 69 70 +1
Lines 10636 10759 +123
==========================================
+ Hits 7853 7957 +104
- Misses 2783 2802 +19
Continue to review full report at Codecov.
|
The graph layout algorithm that is most useful for rendering influence diagrams is available in Unfortunately, it is not easy to automatically install graphviz in a cross-platform way, and this is causing some of the notebooks to fail. I'll fix this to get the tests to pass. |
Ok, tests pass now. It's ready for review. |
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 went through this.
I must confess that I do not fully understand the specifics (context, scope, references) of the architecture in place, or its advancements, so I am unable to give specific feedback on that for now.
However, I was able to see the general purposes of the PR and I like what I see in terms of making things modular, allowing models to be integrated, visualization tools, infrastructure for solvers ... etc
So I don't get the specifics, but I like the general things that I see. I approve.
Thank you, @Mv77 . That's good feedback. I surely need to provide better documentation for what's going on here. I will see what I can do about that before merging. |
This PR makes a number of changes to the "Frame" code in order to improve its flexibility as a way of defining models. A few highlights from the work:
FrameModel
class, which holds the Frames and parameters, but has no solution or simulation functionality. (See Disentangle solution and simulation frameworks in HARK.core and downstream classes #495)infinite
model. (This is akin to thecycles
parameter, but a little less confusing).FrameModel
s can be repeated and combined. This is building towards a more flexible way of composing problems from subproblems -- the subproblems can be built as FrameModels and then glued together.FrameSet
data structure, specifically for containing multiple frames. This solves the problem that frames may have multiple variables as targets, but need to be looked up by single variables and index/order sometimes. An extension ofOrderedDictionary
.FrameAgentType
now takes aFrameModel
as input and is designed to handle the simulation functionality in a general way, abstracted overFrameModel
.control
frames no longer take a transition function. Instead, they get a standard transition function that looks up adecision_rule
for the frame target.ConsPortfolioFrameModel
has been adapted so now, when the model issolve()
ed, the HARKsolution
object is reformed into decision rules that the simulation code can use.FrameModel
as an influence diagram has been moved to the library asdraw_frame_model()
This PR has some new tests for the FrameModel functionality.
Requesting a review from @Mv77 .