You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps we can't have beta=1 in infinite horizons when there's a stochastic component to the update rule for the state, since it keeps pushing the state away from zero and hence pushing up the cost.
So first best is that we allow beta=1 when C=0 and force it to be < 1 otherwise. Agree?
Activity
[-]Fix RuntimeWarning in lqcontrol.py[/-][+][Tests] Fix RuntimeWarning in lqcontrol.py[/+]duncanhobbs commentedon Sep 4, 2019
I think this is a divide by zero error.
self.beta(the discount parameter) is set to 1 by default.Does it make sense to shift the discount parameter default to something like 0.99?
oyamad commentedon Sep 5, 2019
Thanks @duncanhobbs
When
T==None(i.e., the model is one of infinite horizon), thenbeta=1should not be accepted.It should be checked here:
QuantEcon.py/quantecon/lqcontrol.py
Lines 137 to 146 in d9c1e8a
The pair of default values (
beta=1,T=None) is not a good choice:QuantEcon.py/quantecon/lqcontrol.py
Line 115 in d9c1e8a
@jstac ?
jstac commentedon Sep 5, 2019
I'm a bit confused. I think
beta=1is quite common in infinite horizon LQ models, since costs can be driven to zero.See, e.g.,
https://en.wikipedia.org/wiki/Linear%E2%80%93quadratic_regulator#Infinite-horizon,_discrete-time_LQR
Yet it clearly causes an issue here. I have to think about this when I have a bit of time.
jstac commentedon Sep 5, 2019
Perhaps we can't have
beta=1in infinite horizons when there's a stochastic component to the update rule for the state, since it keeps pushing the state away from zero and hence pushing up the cost.So first best is that we allow
beta=1whenC=0and force it to be< 1otherwise. Agree?oyamad commentedon Sep 5, 2019
@jstac Thanks,
but what if(nevermind)C != 0andT != None(i.e., finite horizon)?And here (in the method
stationary_valueswhich is for infinite horizon)QuantEcon.py/quantecon/lqcontrol.py
Line 244 in d9c1e8a
oyamad commentedon Sep 29, 2019
Fixed by #509.