Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #212 +/- ##
==========================================
+ Coverage 93.06% 93.88% +0.81%
==========================================
Files 71 74 +3
Lines 2597 3125 +528
==========================================
+ Hits 2417 2934 +517
- Misses 180 191 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary: State-Choice-Specific Continuous Grids
Main features
continuous_grid_functions, a new top-level argument tocreate_model_dict/setup_model, lets a grid (assets_end_of_period,assets_begin_of_period, or any additional continuous state) depend on the discrete state and choice, not just be one fixed global array.model_config["continuous_states"]entries can now beNone(fully state-specific, no default array).transition_funcs_depend_on_choice) — when neither the budget equation nor the continuous-state transition declareschoice, the law of motion is evaluated once per unique child state instead of once per state-choice, a pure cost optimization.child_state_dedup.py, removing duplicated code and exposing the state-level dedup that (3) relies on.interpnd_regular.pyfor reading stored solutions on own (possibly state-specific) regular grids under Druedahl-Jorgensen.calc_law_of_motionentry point as every other period instead of a duplicated one.Tests per feature
continuous_grid_functions,None-declared grids)test_state_specific_grids_config.pytest_state_specific_grids_law_of_motion.py,test_state_specific_grids_end_to_end.pysolve()/simulate()/choice_values_for_statestest_state_specific_grids_end_to_end.pytest_state_specific_grids_reference.pytest_state_specific_grids_law_of_motion.pytest_state_specific_grids_reference.py(reference.py'swork_costarg)test_state_specific_grids_law_of_motion.py,test_state_specific_grids_config.pytest_interpnd_regular_own_grids.py,test_interpolation.pytest_two_period_continuous_experience.py,test_law_of_motion.py