General Eqm Eqn values (GeneralEqmConditions)

I changed
[p_eqm,~,GeneralEqmConditions]=HeteroAgentStationaryEqm_Case1()
and the FHorz and PType versions, so that the default is now that GeneralEqmConditions is a structure containing the values of the general eqm eqns.

This was done because the old default was pretty useless info (was only useful if you were solving model large number of times and wanted to be able to see if it failed to solve).

If you want the old functionality just set
heteroagentoptions.outputGEstruct=0
which is used to control what form the GeneralEqmConditions output takes.
(default =1 is structure; 2 is vector; 0 is (old) scalar of the sum of squares)

This now also provides a nice easy way to check the values of the general eqm eqns for any guess for general eqm prices you might want to try out. Just set
heteroagentoptions.maxiter=0
and then run
[p_eqm,~,GeneralEqmConditions]=HeteroAgentStationaryEqm_Case1_FHorz()
then it will just use the prices currently in Params (this is what maxiter=0 is doing) and so you can use this as a way to evaluate the General Eqm conditions (rather than needing a dedicated command for it).

Apologies for any codes it breaks, but a simple
heteroagentoptions.outputGEstruct=0
will get them working again the same way they used to.

1 Like