microsoft / times-excel-reader

MIT License
6 stars 2 forks source link

Processing rules in TODO need to be updated #18

Open olejandro opened 1 year ago

olejandro commented 1 year ago

@Antti-L noticed that the following assumptions in TODO.md are incorrect:

Antti-L commented 1 year ago

If Attribute=OUTPUT: Change Comm-IN to Comm-OUT-A; Change Attribute to CEFF

Thanks @olejandro. If Attribute is OUTPUT, indeed mapping it to CEFF would be quite wrong. The OUTPUT Attribute should be mapped to ACT_FLO (aka VDA_FLOP), like VEDA does. But if OUTPUT is defined for a PCG commodity, then it should be just ignored. In addition, ACT_FLO (VDA_FLOP) should be supported as well, with the COM/CG optionally specified in Other_Indexes (instead of Comm_IN / Comm_OUT or using the ~COM syntax in a FI_T).

Note also that Input and Output are otherwise similar, but Input applies only to an Input flow and Output only to an Output flow (when both an input and output commodity are specified on the same row in FI_T). Both are thus mapped to ACT_FLO aka VDA_FLOP. However, Input and Output accept only commodities, while ACT_FLO accepts also genuine commodity groups (specified in the CommGrp/Other_Indexes column, which can hold also commodities).

Antti-L commented 1 year ago

PrimaryCG: if missing, use the output commodity

Indeed that is incorrect, because there is a set of rules for determining the PCG if not specified, and it is much more complex than "use the output commodity". For example, the process flows may consist of several outputs and inputs, but only commodities of one single commodity type should be included in the default PCG (according to type priorities), and any auxiliaries are excluded. Moreover, ouputs could be missing altogether, and then the PCG is determined from the input flows, according to those type priorities.