The allocation of emissions between internal and external inflows is carried out assuming theoretical COD reductions for each inflow, which are then corrected according to the real COD reduction for the whole plant.