Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Write the function for the nonlinear system of equations for the HJBE and ensure it auto-differentiates #3

@jlperla

Description

@jlperla

Implement the #2 function. This will involve modification of http://www.princeton.edu/~moll/HACTproject/HJB_diffusion_implicit_RBC.m and http://www.princeton.edu/~moll/HACTproject/HJB_no_uncertainty_implicit.m

A few things:

  • Modifying the code, a key difference will be that do not solve the sparse system of equations for the V_stacked and then reshape to V. Instead, the "solution" of that system should be implicit in the calculation of the residual.
  • Getting it to auto-differentiate may take some care, as I am not sure if reshape, spdiags, etc. directly support AD without some work. You can use loops instead as required to setup the equations.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions