jlperla / continuous_time_methods

MIT License
24 stars 15 forks source link

Update notation in neoclassical_growth, and pretend we don't know the steady-state #30

Open jlperla opened 7 years ago

jlperla commented 7 years ago

I want to update the neoclassical growth model to be as simple as possible and to test removing the dependence on the stationary solution. The task list is:

sariwxy commented 7 years ago
jlperla commented 7 years ago

Great. I may play around with it as well. If the dV_upwind is taking negative values, then maybe the right approach for the tie breaking rule is to take the max of the two. We can check if it ever takes negative values for both, which seems a little odd since the marginal value should always be positive here.

jlperla commented 7 years ago

Looking at the code, it seems a little odd that we are getting negative values. That would mean (11) and (12) have decreasing value in k... Seems like there might be something odd going on during the convergence?

jlperla commented 7 years ago

I think I found the issue. You didn't rename dk to $\Delta$, and instead had them as two separate numbers.

I have made the changes and am pushing to the server. It seems to give the same, or close to, the correct answer (except at the top corner). But I am also not convinced that the dV_f logic in the original code was ideal, so it isn't necessarily a mistake in the setup.

If you have made any local changes, I would Discard them by going into the github desktop, right clicking on the file you modifed, and saying "Discard Changes...".

I am taking over the file now, thanks so much! When you have time to work on this again, I would go to #2 so we can try the alternative method of solving this problem. But this can wait a week.

jlperla commented 7 years ago

@wangxy373 See latest comment if you didn't get the email.