Table

The Table entity allows the user to custom-specify tables.

Under the ‹year list› option, a table will present results of a given plan on a time period by time period basis (usually the year). The user can tailor the level of detail in the table to the specific requirements of the analysis.

An other option, the ‹budget› table type, allows for the definition of tables that will present side by side results corresponding to the various component plans of a Plan. This features allows, for example, production of such tables as crop budgets comparisons.

Depending on the value of the «Results as» attribute in the headers, the tables will be produced in an editor either in plain text or in web format (html code). The normal commands of the editor can be used to save and / or print the results. In case of html output the table will also be rendered in a pop-up window, and the rendered output can be printed using an external web browser. A table can also be exported to a spreadsheet file. See the section on Running a model for details.

A Table format is defined as a template structure that is available for any Plan in the model. It is activated by a command inserted in a Script, provided the script itself is included in the Plan.

When calculations are carried out for a given plan and such a table is requested then the program will use the elements of the template that are present in the plan and ignore the others.

Table definition

A Table is defined by a unique ID, a label, a unit, followed by zero or more titles, a number of other parameters (see below), and a list of table blocks terminated by the ‹end› (or ‹fin›) keyword.

The other parameters are:

Table blocks

A Table block is made of :

Table items

A Table item is made of :

A tilde is the ~ character, used as a separator between IDs and attributes.

The result-type attribute for a commodity can be consQ, prodQ, availQ, balQ, consV, prodV, availV ,balV , where the suffixes Q and V stand for Quantities and Values, and cons, prod, avail and bal stand respectively for consumed, produced, available and balance.

The aggregated-result-attribute for a Herd can take some fifty one different values. They are detailed in the corresponding Herd Results section of the herd reference page.

The detailed-by-Class result-attribute for a Herd can take four possible values: avgSize, deathRate, offtakeRate, intakeRate.

The syntax for specifying results is the same as the one used in scripts.

Back to top

Table example

table Tableau_budgets_de_culture = ‹Budgets de culture› ;
decDigits = 2, Table type = budget, years= [1, 4];

block = ‹Rendement et valeur de la production›;
var_Tot_céréales, label = ‹Rendement (T/Ha)›;
var_Price , label = ‹Prix par tonne›;
var_Revenu_céréales;
end block;

block = ‹Couts de production›, Block totals;
comm_Travail~consV;
comm_Pompage~consV;
comm_Intrants~consV;
end block;

block = ‹Résultat par Ha (avant financement)›;
var_CashIncome, footnote = ‹Valeur de la production moins intrants et pompage›;
var_RevJour , decDigits=2 ;
end block;

fin;

Back to top

Table templates

A table can be specified using the Table template:

table ID = ‹label› ; //, unit = ‹unit› ; // optional titles: STRING ; // totals, allColumns, colWidth=1, decDigits=2, tabScale=1, Table type = yrlist, years = [1, 3~6, 12]; //table blocks end;

A table block can be specified using the TableBlock template:

block ; // = ‹title› ; //, Block totals ; // , decDigits = 2; // table items end block;

A table item can be specified using the one of the four possible TableItem templates:

comm_CowMilk~consQ ; //, label = ‹label› ; //, footnote = ‹footnote› ; //, decDigits = 2; var_V1 ; //, label = ‹label› ; //, footnote = ‹footnote› ; //, decDigits = 2; herdClass_Herd1~avgSize~JF ; //, label = ‹label› ; //, footnote = ‹footnote› ; //, decDigits = 2; herd_Herd1~nbrTotal ; //, label = ‹label› ; //, footnote = ‹footnote› ; //, decDigits = 2;

Names and attributes are selected from possible values in drop-down lists.

Back to top