Skip to content
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

set aggregate property on frame #1064

Merged
merged 5 commits into from
Nov 15, 2021
Merged

set aggregate property on frame #1064

merged 5 commits into from
Nov 15, 2021

Conversation

sbenthall
Copy link
Contributor

@sbenthall sbenthall commented Sep 9, 2021

This solves #1063 by setting the aggregate property of a variable on its frame in a FramedAgent.
It also pulls all the FramedAgent logic into its own modules frames

No new tests -- this is a refactor.
Some docs fixes

  • Tests for new functionality/models or Tests to reproduce the bug-fix in code.
  • Updated documentation of features that add new functionality.
  • Update CHANGELOG.md with major/minor changes.

@sbenthall sbenthall requested a review from Mv77 September 9, 2021 16:22
@sbenthall
Copy link
Contributor Author

@Mv77 could I ask you to review this? Should be quick.

@alanlujan91
Copy link
Member

This looks good to me. I wonder if there are frames that could be joined, like PermShk and TranShk. Too many frames might become too complex to understand for new users. It would also be useful to map frames in the simulation with frames (or subperiods) in the solution method.

Comment on lines +76 to +78
self.shocks = {}
self.controls = {}
self.state_now = {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where do these get defined now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm i found it

@sbenthall
Copy link
Contributor Author

Yes, mapping simulation frames to the solution is a desired next step.

There seems to be some difference of opinion about the best way to group frames.
I prefer more granular frames. @mnwhite thinks more grouped frames might be better for performance reasons. I hear you saying you think more grouped frames are easier to understand.

The current implementation is agnostic about the best amount of aggregation in framing. That way performance of the same model, differently written, can be tested.

One benefit of granular frames is that they support the kind of plotting done in #1071

@sbenthall sbenthall merged commit a5634ab into econ-ark:master Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants