Commodity

A commodity is defined by its name and price; more precisely by a unique ID, a label, a unit, and a unit price.

To be able to deal, in our model, with consumption and production of commodities, we specify them within a Plan as being consumed or produced.

In some cases, a commodity is not actually ‘produced’, but is ‘available’ in a certain quantity: so many hours of operation are available from a vehicle of the company, so much water can come out of a canal. Such a commodity corresponds to a cost when it is actually consumed, but the level of availability does not correspond to a production. It is like if the commodity had a given price when consumed, and a price zero when ‘produced’ (i.e. available).

For each commodity specified in a Plan, one has to specify whether it is produced, available or consumed, and the corresponding level (a time series of values), e.g. the “level” of the commodity “grain” produced is the yield. If a commodity is specified directly in value, the price can be set to 1 and the values specified as the level within a plan. The same commodity can be more than once in the definition of a plan, with different attributes and levels (e.g. yield and post harvest losses).

Example of Commodity

commodity Maïs = ‘Maïs’ , unit = ‘tonne’ , price = 230 ;

Example of Commodity within a plan

Riz prod [2 2.5 3 3.5] ;

The ‘tag’ associated to the commodity can be ‘cons’ for consumed, ‘prod’ for produced or ‘avail’ for available.

A time series is specified by white space-separated values enclosed in square brackets.

Editor template

commodity ID = ‘label’ , unit = ‘unit’ , price = Value ;

Result of calculations

When a plan that includes a commodity is calculated, results are in Q(antities) and in V(alues), and thus can be of type consQ, prodQ, availQ, consV, prodV and/or availV. Results also include the Balance (produced plus available minus consumed), and the corresponding result-type attributes are balQ and balV.

These result-type attributes are used to refer to a result in a Script or in a Table definition.

Results of types cons, prod or avail are in absolute values, i.e. a consumption or a production quantity of 10 will appear as 10. Only balQ and balV results will be in algebraic terms, i.e. to a consQ of 10 would correspond a balQ of -10 .

Example: to specify the value of commodity Labor consumed by a plan, as a table item as part of a table block, one would insert:
Labor~consV ;