Skip to content

Remaining PType and TPath changes (no ExpAsset)#78

Draft
MichaelTiemann wants to merge 7 commits into
vfitoolkit:masterfrom
MichaelTiemann:remaining-ptype-changes
Draft

Remaining PType and TPath changes (no ExpAsset)#78
MichaelTiemann wants to merge 7 commits into
vfitoolkit:masterfrom
MichaelTiemann:remaining-ptype-changes

Conversation

@MichaelTiemann
Copy link
Copy Markdown
Contributor

These are the non-ExpAsset changes needed thus far to progress a model through all the ptype and tpath things I have encountered.

These are the non-ExpAsset changes needed thus far to progress a model through all the ptype and tpath things I have encountered.
@MichaelTiemann
Copy link
Copy Markdown
Contributor Author

May need to watch out for this:

<<<<<<< mixed-horizon-tpath
                V_final.(iistr)=reshape(permute(reshape(V_final.(iistr),[N_a,N_e,N_j_temp]),[1,3,2]),[N_a*N_j_temp,N_e]);
            end
        else
            if N_e==0
                V_final.(iistr)=reshape(permute(reshape(V_final.(iistr),[N_a,N_z,N_j_temp]),[1,3,2]),[N_a*N_j_temp,N_z]);
            else
                V_final.(iistr)=reshape(permute(reshape(V_final.(iistr),[N_a,N_z,N_e,N_j_temp]),[1,4,2,3]),[N_a*N_j_temp,N_z,N_e]);
            end
        end
    end
    % Reshape AgentDist_init and turn AgeWeights_T into appropriate size so that we can always just do AgentDist.*AgeWeights
=======
                V_final.(iistr)=reshape(permute(V_final.(iistr),[1,3,2]),[N_a*N_j_temp,N_e]);
            end
        else
            if N_e==0
                V_final.(iistr)=reshape(permute(V_final.(iistr),[1,3,2]),[N_a*N_j_temp,N_z]);
            else
                V_final.(iistr)=reshape(permute(V_final.(iistr),[1,4,2,3]),[N_a*N_j_temp,N_z,N_e]);
            end
        end
    end
    % Reshape AgentDist_initial and turn AgeWeights_T into appropriate size so that we can always just do AgentDist.*AgeWeights
>>>>>>> remaining-ptype-changes

@MichaelTiemann
Copy link
Copy Markdown
Contributor Author

Another thing to watch for: in order to run my model in the TPath section, I needed to un-hardcode fastOLG=1 in simoptions. I think these changes have all the bits needed to work, but if there are problems, I can cherry-pick from the ExpAsset changes (that are much more extensive in the fastOLG sections). The bottom line is that I do have all the changes needed to get to the new known functional horizon, but I might not have split it perfectly down the middle. We'll see.

@MichaelTiemann
Copy link
Copy Markdown
Contributor Author

I just cleaned up this pull request to agree with the latest upstream changes. Most changes are cleaning or minor. If we could close this out, that would leave just the ExpAsset work to review in my other, larger pull request.

@MichaelTiemann MichaelTiemann marked this pull request as draft May 13, 2026 17:00
@MichaelTiemann
Copy link
Copy Markdown
Contributor Author

I've converted this to a draft as most of the changes are now obsoleted by MixHorz changes already integrated. I'm keeping it as a record of some AggVars handling that may or may not be worth arguing for in the future.

robertdkirkby added a commit that referenced this pull request May 13, 2026
- HeteroAgentStationaryEqm_InfHorz_PType: capture FnsAndPTypeIndicator_ii
  from PType_FnsToEvaluate and stash on PTypeStructure for subfn use
- ValueFnIter_InfHorz_TPath_SingleStep: restore N_a/N_z; reshape Policy
  to PolicyKron in the N_d==0 branch
- TransitionPath_InfHorz_PType_shooting: drop stray blank line
- ValueFnIter_InfHorz_HowardGreedy_nod_raw: remove duplicate Howards-greedy
  -Inf warning block (keep the duplicate maxiter warning)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@robertdkirkby
Copy link
Copy Markdown
Contributor

I have adopted the changes to
TransitionPaths/InfHorz/PType/TransitionPath_InfHorz_PType_shooting.m
TransitionPaths/InfHorz/subcodes/ValueFnSingleStep/ValueFnIter_InfHorz_TPath_SingleStep.m
HeterogeneousAgent/InfHorz/PType/HeteroAgentStationaryEqm_InfHorz_PType.m
ValueFnIter/InfHorz/ValueFnIter_InfHorz_HowardGreedy_nod_raw.m

in the following push
eb3eaf8

The changes to
EvaluateFnOnAgentDist/FHorz/LifeCycleProfiles_FHorz_Case1.m
can be abandoned (just eliminates a space)

The changes to
EvaluateFnOnAgentDist/TransPath/EvalFnOnTransPath_AggVars_InfHorz.m
can be abandoned (refers to transpathoptions which this file does not take as input)

After these, can you please rebuild the pull request. Will be getting down to just the last few files by that point :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants