Patrick Anderson <panderson@andersoneconomicgroup.com> wrote:
> I am having similar problems with the R2009 versions implementing dynamic
programming algorithms for this type of problem, including with the
CompEcon Toolbox that used to run.
>
I am not sure why you would be attempting to solve a dynamic programming
problem using a toolbox. The difficulty with DP (aside from the curse of
dimensionality) is that you almost always need to program the solution from
scratch for each new problem. The beauty of DP is that the programming is
almost always a very simple recursion, and is done in jus a few lines of
code, especially with MATLAB.
If you are having difficulty implementing DP for your particular investment
timing problem, I suggest that you work on a simpler version first. In
particular, ignore discounting, and ignore any stochastic side to the
problem.
Also, if you can, work through an example or two by hand, just on paper.
See the method in action, see the intermediate calculations. Then try and
identify where your code doesn't match your paper solution.
The hardest part with DP is to formulate the problem, choosing correctly
what should be the stages, and what should be the state variables. Then,
identify the state transformation equations, and you are about finished.
--
Dr Tristram J. Scott
Energy Consultant
> I am having similar problems with the R2009 versions implementing dynamic
programming algorithms for this type of problem, including with the
CompEcon Toolbox that used to run.
>
I am not sure why you would be attempting to solve a dynamic programming
problem using a toolbox. The difficulty with DP (aside from the curse of
dimensionality) is that you almost always need to program the solution from
scratch for each new problem. The beauty of DP is that the programming is
almost always a very simple recursion, and is done in jus a few lines of
code, especially with MATLAB.
If you are having difficulty implementing DP for your particular investment
timing problem, I suggest that you work on a simpler version first. In
particular, ignore discounting, and ignore any stochastic side to the
problem.
Also, if you can, work through an example or two by hand, just on paper.
See the method in action, see the intermediate calculations. Then try and
identify where your code doesn't match your paper solution.
The hardest part with DP is to formulate the problem, choosing correctly
what should be the stages, and what should be the state variables. Then,
identify the state transformation equations, and you are about finished.
--
Dr Tristram J. Scott
Energy Consultant