The title of this topic draws attention to the fact that it is easy to make mathematical errors by not taking units into account. And that in a sense, if we are expecting AggVars (or other things) to distribute across PType weights, then we must be consistent in that interpretation, both in the formation of the Aggregate value and in its use (such as in q GE equation).
I tracked down a problem to the fact that in trying to correct the warning message about PType Weights not summing to 1 (from StationaryDist_MixHorz_PType), I created a different problem in the interpretation of AggVars. The offender is this line from HeteroAgentStationaryEqm_MixHorz_PType_subfn:
AggVars=sum(AggVars_ConditionalOnPType.*PTypeStructure.ptweights',2);
In this case, my AggVars_ConditionalOnPtype is as follows:
AggVars_ConditionalOnPType =
0 0.9444 0
0 0.9506 0
0 0.0877 0
0 0.1917 0
0 0.0001 0
0 0 0
0 0.0335 0
0 0.0119 0
0 0.3005 0
0 0.0949 0
0 0.0266 0
0.7409 0 0
1.4245 0 0
0.0104 0 0
0.0970 0 0
0.1883 0 0
0.6973 0 0
0.0703 0 0
0.1493 0 0
0.0232 0 0
0 0 1.2049
0 0 1.0788
0 0 0
0 0 0.0000
and my ptweights are:
PTypeStructure.ptweights
ans =
0.5000
0.4000
0.1000
Why these weights? Because both the general dollar value of economic activity and energy usage is distributed according to those numbers. However, as can be seen from the AggVars, none of them span multiple PTypes; they are all unique to their respective PTypes.
Clearly, due to this mutual exclusivity, I should not set the PType weights to other than 1, and somehow the warning message should be suppressed after taking the conditionality into account.
I’m posting this in case there are other considerations, either from the AggVars usage or generation perspective, or in other ways the PType weights are used.
UPDATE: I note that HeteroAgentStationaryEqm_MixHorz_PType does evaluate the conditionality term, so perhaps the solution is to port the conditionality logic from that function into StationaryDist_MixHorz_PType and only complain when the conditional values sum to other than 1.