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

Some expansion to the MonteCarloSimulator functionality #1499

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sbenthall
Copy link
Contributor

@sbenthall sbenthall commented Oct 1, 2024

This PR makes a few small additions and changes to the Monte Carlo simulation functionality.

  • It introduces a new class, MonteCarloSimulator, which is a lot like the AgentTypeMonteCarloSimulator, except that this doesn't make any assumptions about birth/mortality, and it doesn't have the 'read_shocks" functionality. This is a more stripped down version of what's already there.

    • It introduces some duplicate code, and maybe there's a way to make the implementation more efficient by thinking about what sort of abstract or super- class a Simulator should be. This will require some thinking about architecture which I think it would make sense to work with @mnwhite on
  • It makes a small change so that reward variables (i.e. u) get computed in simulations, and added into the history. This is useful when trying to compare the outcomes of agents across different models and parameterizatiosn.

  • The apply_fun_to_vals function compartmentalizes a coding pattern used widely in the Monte Carlo Simulator code. I didn't work it through the library yet since it replaces just one line of code with something arguably more readable.

  • 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 mnwhite October 1, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants