QuantEcon / ContinuousDPs.jl

Continuous state dynamic programming
BSD 3-Clause "New" or "Revised" License
13 stars 10 forks source link

Add option to supply initial value function #11 #26

Closed tokuma09 closed 3 years ago

tokuma09 commented 5 years ago

This pull request provides a new option to supply initial value function in solve. Since Julia does not allow solve(cdp, method::Type{Algo}=PFI, v_init::Vector{Float64}; tol, max_iter, verbose, print_skip), I assign v_init to keyword arguments with zeros(cdp.interp.length).

Detail

  1. Users provide an initial guess for value function, v_init. (Of course, they don't need to provide this.)
  2. Given v_init, compute and update basis coefficients C.
  3. Using this basis coefficients C, calculate value function or policy function.

close #11.

tokuma09 commented 5 years ago

This is a demo notebook of this option.

isapprox shows that results with and without this option are same.

QBatista commented 3 years ago

@tokuma09 Could you please let me know what the status on this PR is? Is it ready for review?

oyamad commented 3 years ago

Superseded by #33.