You can now constrain the general eqm parameters (the ones named in GEPriceParamNames). This works for both infinite and finite horizon models (and is now explained in an Appendix in the Intro to OLG Models, following is pretty much copy-paste from there).
Say you are finding the wage, w, in general equilibrium. You know this has to be positive, and if you try to solve the model with a negative wage then it gives errors. You can set constraints on the general equilibrium parameters to deal with these situations. There are three possible constraints, all of which are applied by specifying the name of the parameter you want to constrain. In the following, we will use w as the name of the parameter (in GEPriceParamNames) that we wish to constain.
You can constrain a parameter to be positive using
heteroagentoptions.constrainpositive={‘w’}
You can constrain a parameter to be between 0 and 1 (e.g., because it is a probability) using
heteroagentoptions.constrain0to1={‘w’}
You can constrain a parameter to be between A and B using
heteroagentoptions.constrainAtoB={‘w’}
and then you specify the values of A and B, e.g. that w is between 3 and 5, with
heteroagentoptions.constrainAtoBlimits.w=[3,5]
[Use name of parameter as field, ‘.w’, and then use a vector of two values for the range to apply to that parameter]