-
-
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
a not-too-general value backwards induction algorithm built on DBlocks #1438
base: master
Are you sure you want to change the base?
Conversation
Clarifying that by "general", I mean "not-too-general". A "not-too-general" solver, by my definition, is a solver that:
This is in contrast with a "model specific solver", which is what most HARK models currently have; these solvers contain specific model data. |
@@ -52,7 +52,7 @@ | |||
"dynamics": { | |||
"b": lambda k, R, PermGroFac: k * R / PermGroFac, | |||
"m": lambda b, theta: b + theta, | |||
"c": Control(["m"]), | |||
"c": Control(["m"], upper_bound=lambda m: m), |
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.
@mnwhite @alanlujan91 I wonder what you think about this way of introducing upper/lower bound information on control variables.
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 think this looks good.
If we wanted to differentiate between a fixed (real number) upper bound, and a functional upper bound, we could use the term upper_envelope
for a function/lambda.
…ng test on normalized consumption block
This PR now includes:
This PR is now ready for review. Requesting review from @alanlujan91 or @mnwhite As I mentioned in the original post for this PR, my next step, building on this PR, is a demonstration of a configuration that will use:
|
One thought on how to improve this PR:
|
Recent changes add handling and tests for cases where the stage has zero control variables. |
This is now ready for review again. |
This PR aims to provide a general backwards induction algorithm that operates on a single DBlock.
It simply arranges the pieces that come with the DBlock (decision value function, arrival value function), in a sensible way, with an optimization over the action space to find the best action at each point in the state grid.
While the algorithm is not as good as FOC or EGM methods, I'm doing this for several reasons:
The first commit of this PR just sketches the algorithm out, but it isn't tested.
One question is how to design this so that it is more agnostic to different optimizers. I know @alanlujan91 is keen on estimagic.