rollDownFoodDelta: Roll Down Food Delta

Description Usage Arguments Details Value

Description

Balancing of the SUAs is down at the primary product level. This balancing will likely adjust the food for that primary commodity, and an adjustment of the food value thus implies that the production of the children commodities should be likewise adjusted.

Usage

1
2
rollDownFoodDelta(data, tree, standParams, specificTree = FALSE,
  feedElements = c())

Arguments

data

The data.table containing the full dataset for standardization.

tree

The commodity tree which provides the edge structure.

standParams

The parameters for standardization. These parameters provide information about the columns of data and tree, specifying (for example) which columns should be standardized, which columns represent parents/children, etc.

specificTree

Logical. If TRUE, it is assumed that there is a unique record in tree for each unique element of standParams$mergeKey. If FALSE, extraction rates for each parent/child commodity are assumed to apply globally over all time.

feedElements

Sometimes excess production will need to be allocated to some processed product. If all utilizations are N(0,0), we must allocate it somewhere. The default is to place it into food, but this list specifies which elements should allocate such a difference to feed.

Details

A negative change implies that production of children commodities should be reduced according to their variance. A positive change implies that no adjustment is necessarily required, but it is still important to increase flour production, for example, so that the correct bran and germ amounts are created. Thus, production for first processing level commodities only should be increased if the delta value is positive, and these increases should be such that the production of the first processing level products follows the share ratios as closely as possible.

This code is thus rather complicated: we must propogate the change in the primary level food into adjustments in each of the processing amounts for all the children. The production updates for these elements will then impose an adjustment to the balances of those SUAs (but only to the food element, as we do not want to change the balanced trade data). This, then, will impose adjustments to production of all of the processed elements from this commodity, and so on. Thus, we must update the entire SUA.

Value

A data.table of the same form as data, but after the processing has been performed.


SWS-Methodology/faoswsAupus documentation built on May 9, 2019, 11:45 a.m.