-
-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vFunc and vPPfunc are sometimes Null Functions #1452
Comments
|
That fixes the IndShockConsumerType. The PerfForesightConsumerType is still returning a null function for vPPfunc though. |
That's because there is no cubic spline interpolation for PerfForesight.
The *true* consumption function really is piecewise linear (often just one
line!), not smooth. So the marginal marginal value function is either
perfectly represented by the (numeric) derivative of the marginal value
function, *or* is actually a discontinuous function that we don't currently
have a way to represent.
Both LinearInterp and CubicInterp treat the function as continuous. We
would need to extend those classes to allow versions with "proper"
discontinuities. As is, discontinuities can be *approximated* by putting
back-to-back gridpoints that are (say) 1e-12 apart. You *can* put two
gridpoints right on top of each other, but it runs the risk of the function
being evaluated *right* at that point, which will return an error without
further intervention.
…On Tue, Jun 11, 2024 at 10:57 AM DominicWC ***@***.***> wrote:
That fixes the IndShockConsumerType. The PerfForesightConsumerType is
still returning a null function for vPPfunc though.
—
Reply to this email directly, view it on GitHub
<#1452 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKRAFNOKIIWDBHVB22CDXDZG4F4VAVCNFSM6AAAAABJC3LTL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRQHE3TSNJYGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@mnwhite should it throw an AttributeError then? "You tried to set an attribute that is not applicable to this setting." |
*Maybe*. I'm mostly ok with users doing slightly risky things like that.
…On Tue, Jun 11, 2024 at 11:08 AM Alan Lujan ***@***.***> wrote:
@mnwhite <https://github.com/mnwhite> should it throw an AttributeError
then? "You tried to set an attribute that is not applicable to this
setting."
—
Reply to this email directly, view it on GitHub
<#1452 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKRAFJPG2PMP6OL346H4OLZG4HGFAVCNFSM6AAAAABJC3LTL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRRGAYDKMJYG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It seems like this is working as intended. I'll stick something about this in the documentation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
If PerfForesightConsumerType or IndShockConsumerType are solved, their solution contains a function 'vPPfunc' with the type HARK.utilities.NullFunc. This function can't be plotted. This is likely an issue in several other models.
For IndShockConsumerType specifically, vFunc is also a Null Function.
To Reproduce
The text was updated successfully, but these errors were encountered: