OcelotProject / Ocelot

Ocelot is open-source linking for life cycle assessment. See https://ocelot.space/ for more information.
Other
25 stars 7 forks source link

Rare earth allocation is wrong #141

Closed cmutel closed 5 years ago

cmutel commented 5 years ago
screen shot 2018-12-08 at 12 09 27

However, ratio is consistent with the exception of a few specific inputs. Probably wrong allocation method.

cmutel commented 5 years ago

Combined production seems to be used with the following datasets:

You can see the test for determining if something is combined production, and how the function works, here:

This all works fine, except for rare earth oxides production, where our allocation method always produces values which are too low.

The rare earth oxides production dataset doesn't have any formulas, so Ocelot just scales up the production amounts to produce one kg of each reference product. However, the release has higher values for elementary flows and inputs, by the following factors (compared to Ocelot results):

I have tried to use a combination of price, amount, and production volume to resolve this discrepancy, but am stuck. I can't think of any way how these ratios could be arrived at. Crucially, because they are all higher than one, I don't think it can just be a different allocation method.

Here is the data from the master data::

{
    "samarium europium gadolinium": {
        "amount": 0.0709219858156028,
        "production volume": 1213510.63829787,
        "price": 6.82,
    },
    "cerium concentrate": {
        "amount": 1.74822695035461,
        "production volume": 55916666.6666667,
        "price": 2.23,
    },
    "lanthanum oxide": {
        "amount": 1,
        "production volume": 15433000,
        "price": 6.82,
    },
    "neodymium oxide": {
        "amount": 0.546099290780142,
        "production volume": 12413500,
        "price": 11.4,
    },
    "praseodymium oxide": {
        "amount": 0.180851063829787,
        "production volume": 4160200,
        "price": 10.7,
    },
}
cmutel commented 5 years ago

BTW, above data is for version 3.3, cutoff system model, but the same problem and even the same rations apply to 3.5.

cmutel commented 5 years ago

Comment from Ingo Meinshausen (email 21.12.2018):

For example, let’s take the CN dataset, and its linked dataset of samarium europium gadolinium concentrate. In the undefined version, the exchange amount of Aluminium to water surface is 3.0506E-5.  In the linked version, the amount is 3.8102E-05. I have no clue how this amount got from the unlinked to the linked one. 

Looking at the pre-allocation DS we see several reference products with amount different from 1: rare earth oxides production from bastnäsite concentrate. In the 3.5 logs I find this entry for Aluminium for the allocation to samarium europium gadolinium concentrate, 94% rare earth oxide:

Performing allocation   elementary exchange, old amount = 3,0506E-05, new amount = 7,62045224372886E-07 (true value)   
# allocate multiple product activities  
# AttributionalTrueValueAllocation   
# rare earth oxides production from bastnäsite concentrate, CN, 2000 - 2018   
# Aluminium

That number looks a lot better than the one in the 3.3 calculation, at least it got smaller compared to the undefined DS.

Later the amount of the Aluminium elementary exchange is scaled to the amount you had reported:

Scaled amount of exchange   elementary exchange Aluminium - amount = 3,81022612186443E-05 scaleFactor = 50   
# allocate multiple product activities   
# rare earth oxides production from bastnäsite concentrate, CN, 2000 - 2018   
# samarium europium gadolinium concentrate, 94% rare earth oxide

The scaling factor corresponds to the old amount of the refProd (0.02). Given the circumstances I would proclaim the result for Aluminium correct.

cmutel commented 5 years ago

OK, we need to rewrite combined production so that it does economic allocation for each exchange which has no formula.

cmutel commented 5 years ago

Special cased rare earths in 5fca08d6c06da1199e4f17927b1433b373b368a7.

There is one other dataset which could potentially fail the "missing formulas, so can't do combined production" test: cement production, alternative constituents 6-20%. Master data set, allocated version. The current version actually works with cement production, though it is still questionable whether the produced result is intended.