value_iteration bugs
sbenthall opened this issue · 2 comments
The value_iteration
solution algorithm has a couple of issues:
- Extra
dr
parameter is documented but not used in code: https://github.com/EconForge/dolo.py/blob/master/dolo/algos/value_iteration.py#L31 - The solution algorithm requires the existence of
controls_lb
andcontrols_ub
functions ever if there is a separately defined CartesianDomain for the model controls: https://github.com/EconForge/dolo.py/blob/master/dolo/algos/value_iteration.py#L44-L45
First item is indeed a regression. There should be an argument dr0 (resp drv0), to be used as initial guess for the decision rule (resp the value function).
I'm not sure about the second one. Right now, what is defined as a CartesianDomain is the set of boundaries for the endogenous spaces. But the domain for the domain we optimize on is always represented by two functions controls_ub
and controls_lb
. These can be specified in two ways: either by adding a controls_lb
(resp ub
) set of equations or by adding complementarity conditions to the arbitrage equations.
Oh, I apologize. I misunderstood the role of domain
.
I see now why the upper and lower bounds on controls need to be dynamic.