-
Notifications
You must be signed in to change notification settings - Fork 33
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
Refactor law of motion. #373
Conversation
tobiasraabe
commented
Aug 4, 2020
- Refactor the law of motion such that the whole logic is only in one place.
- Simplify the collection of child indices.
Codecov Report
@@ Coverage Diff @@
## main #373 +/- ##
==========================================
+ Coverage 85.42% 85.89% +0.46%
==========================================
Files 47 47
Lines 3411 3410 -1
==========================================
+ Hits 2914 2929 +15
+ Misses 497 481 -16
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Great PR. Very useful to recognize that the LOM and the child index creation use the same logic!
|
||
if is_n_step_ahead and period != n_simulation_periods - 1: | ||
df = _apply_law_of_motion(current_df_extended, optim_paras) |
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.
Would it be an option to not apply the law of motion here but take choice and dense key to get the next indices directly from the state space?
Then we would also save the indexer step and save the calculation.
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 have created the issue #376 to discuss your point. Even if my point on cpu bound and io bound is not true, it makes sense to separate the changes. Is it ok with you?