Example PIN File Definition

Following the constructors and parameter definitions set out above, a Multiple Target Report could be added and defined in the PIN file as:


ReportWriter.addReport(new MultipleTargetReport("area",
                      "Area by forest unit", 
                      "hectares", 
                       control.getTargetTable(),
                      "feature.Area.", 
                      "CURRENT", 
                      "<a href=\"areaPercent.html\">View
                       this table in percent format</a><br>", 
                       false
                       ));


      

In this example a new Multiple Target Report is being added to the Report Writer with a filename "area". This would create three files when reports are saved named "area.html, area.png and area.csv". The title of this particular report would be "Area by forest unit" followed by the scenario name it was saved to (Area by forest unit, Basic Scenario).The unit that appears on the Y axis of the stacked bar chart is "hectares".

The information for this report is found in the "TargetTable", specified by control.getTargetTable(). Once the Report Writer has found this table it searches the 'TARGET' column for all targets with the prefix "feature.Area.". In the HTML table this prefix will be eliminated and the remainder will be used to created nested column headings in alphabetical order. The matching records provide values from the "CURRENT" column to total for each period.

In this particular example, the company name and date (Spatial Planning Systems: September 2002) will appear under the PNG chart in the HTML document. The last parameter (computePercent) is set to "false", meaning the values will not be calculated as a percentage of the total but left as absolute values.