Finite Difference Solver
Policy iteration solver for HJB equations discretized on a grid.
The mathematical contract for the grid-based methods is documented in
PDE Solving Methods. This page covers the solver's role
and configuration; the FD-specific transport contract and dimension kinds
live on that page.
Approach
The HJB PDE is discretized on a grid over the state variables. The solver iterates:
- Policy improvement: at each grid node, find the control that maximizes the HJB residual using the current value function.
- Policy evaluation: solve the resulting linear system for the value function. Implicit, Crank-Nicolson, and Strang-ADI paths use the FD transport operator; explicit Euler uses the scalar driver.
- Repeat backward in time from the terminal condition to
t = 0.
Solvers
PolicyIterationSolver::solve_grid_controlsolves a generic [ControlProblem] with an explicit Euler step.- The FD-specific
PdeProblemcontract supplies the transport operator for the implicit, Crank-Nicolson, and Strang-ADI integrators.
See solver/src/numeric/finite_difference/ for the implementation.
Configuration
Grid bounds and resolution are configured through Grid<N>. Time stepping,
SOR tolerance, and scheme selection are configured on PolicyIterationSolver.
See solver/src/numeric/.
When to use
Finite difference is preferred when:
- The state space is low-dimensional (1-3 dimensions).
- You need high accuracy on a fixed grid.
- The dynamics have simple boundary behavior.
It becomes infeasible above 3-4 dimensions due to the curse of dimensionality (grid points grow exponentially).