ifference between revisions of "EMK:Output Specs"

From EMK Wiki
Jump to navigation Jump to search
Line 91: Line 91:
  
 
'''Function Partition'''
 
'''Function Partition'''
*''Syntax'' Function : <list of output spec functions>
+
{|class="wikitable"
 +
|-
 +
| '''Syntax''' || '''Example''' || '''Specification'''
 +
|-
 +
| Function:<list of output spec functions> || Function:Ave(Generator.Generation), Max(Node.Price)
 +
|}
 +
 
  
 
*Ave() - Average value, weighted by time.
 
*Ave() - Average value, weighted by time.
Line 103: Line 109:
  
 
'''Volatility Matrix Divisions:'''
 
'''Volatility Matrix Divisions:'''
 +
{|class="wikitable"
 +
|-
 +
| '''Syntax''' || '''Example''' || '''Specification'''
 +
|-
 +
| Version:All, Version(<volatility matrix variable>):All || Version(InflowYear):All
 +
|}
 +
 
*Version - partitions all the simulation versions.
 
*Version - partitions all the simulation versions.
 
*Version(<volatility matrix variable>) - partitions the simulation versions by the given '''''[[EMK:Run Window#Volatility Matrix|Volatility Matrix]]''''' variable.
 
*Version(<volatility matrix variable>) - partitions the simulation versions by the given '''''[[EMK:Run Window#Volatility Matrix|Volatility Matrix]]''''' variable.

Revision as of 18:04, 20 August 2013

Example OutputSpec Window

An Output specification (OS) Resource allows you to define custom Reports in a tabular form using Run Output data. Reports generated using OS Resources are in text based, comma separated (csv) form. This is how results are exported for external analyses. Any element shown in the results window can be exported via the Output Spec.


The Output Specs window has the following components:

  • The 'OS Details Box:' Used to identify (Name) and describe (Description) the OS Resource.
  • Two 'Formatting Check Boxes:' Repeat Column headings and Repeat Row headings - which determine whether the parent column and row headings appear once per column or row (Boxes unchecked), or for every column and row of the columns they apply to (Boxes checked) respectively.
  • The 'OS Partition Box:' Specifies how the results data will be summarised and presented.

Note: OS Reports can be produced from previously generated data from the Results Window or Results Menu.

The Output Specs Details Box

OS Details Box Fields

Name OS Resource name - used to reference the OS in other Resources.
Description Free text field for supplementary information.'
Prefilters Specifies a date range that the OS will only process data for - this allows the OS to be used on multiple Results sets covering disparate date ranges and only extract results for a common period. The Prefilter variable is defined in the Resource/System Definition.

Formatting Check Boxes

The Formatting Check Boxes are used to control the output of headers in columns and rows in the output. If the OS Resource is used when both boxes are left unchecked, then a heading only appears once in the output. For example a parent row heading will only appear with the first child row heading as in the table below:

Parent Row Heading 1 Child Row Heading 1
Child Row Heading 2
Child Row Heading 3
Parent Row Heading 2 Child Row Heading 1
Child Row Heading 2
Child Row Heading 3

Running the same OS with the 'Repeat Row Headings' box checked would produce a heading configuration as below:

Parent Row Heading 1 Child Row Heading 1
Parent Row Heading 1 Child Row Heading 2
Parent Row Heading 1 Child Row Heading 3
Parent Row Heading 2 Child Row Heading 1
Parent Row Heading 2 Child Row Heading 2
Parent Row Heading 2 Child Row Heading 3

Note: Repeating the headers is useful for automatic post-processing and when viewing large output files with multiple row partitions.


Output Specification Partitions

Example Output Specs Window #2

To create an Output Spec, file, columns and rows need to be defined. This is done by progressively dividing the data using 'Partitions'. Each partition creates a number of divisions to which data is directed according to some criterion. The partition is specified in two parts <Partition Type>:<Partition specification>, where the specification is generally a comma delimited list. The results of an Output Spec report is one or more CSV style files. Partitions direct data either to separate output files or to separate columns or rows within the file (similar to the way a pivot table is displayed, or a crosstab query).

Partition Types fall into the following categories:

Partitions Type Purpose Specification
Entity Describes type of data in the results set that is to be processed with the OS. Either 'All', or a list of entity names
Function Describes the processing to be carried out on the data defined by an Entity partition. One or more Output Spec functions
Version Allows Output to be broken down by versions in the Volatility Matrix. 'All'
Date/Time Allows data to be aggregated by specified time periods. 'All'


In the example to the right, the file is defined by 'Year' so and output file will be created for each calendar Year.

The 'Column definition' is for the Average Nodal Price at the BEN and HAY Nodes by each inflow year. The :2 limits the results to two decimal places.

The 'Row Definition' is defined as MonthOfYear/Version:All which will display Average monthly Price for each inflow year

As a result, the final output will be a file for each calendar year, and the Average monthly price at Benmore and Haywards for each inflow year.


Function Partition

Syntax Example Specification
Function:<list of output spec functions> Function:Ave(Generator.Generation), Max(Node.Price)


  • Ave() - Average value, weighted by time.
  • Tot() - Total value, summed by hour.
  • Max() - Maximum value in a sample.
  • Min() - Minimum value in a sample.
  • First() - The first (earliest) value in a sample.
  • Last() - The last (latest) value in a sample.

The First and Last functions would typically be used to get the earliest and latest (in modelled time) value in a sample. These functions do not have as much meaning if there are multiple records for each time period, i.e. if the Version or the Entity partition is not applied. For example if you were to use the Last(Generator.Generation) function over all generators then only the latest generation for the last generator (alphabetically) would be returned.

Volatility Matrix Divisions:

Syntax Example Specification
Version:All, Version(<volatility matrix variable>):All Version(InflowYear):All
  • Version - partitions all the simulation versions.
  • Version(<volatility matrix variable>) - partitions the simulation versions by the given Volatility Matrix variable.

Entity Divisions:

  • <Entity Type Name> - partitions by the entities belonging to the named entity type. If 'All' is specified then a division is created for every entity, alternatively a list of individual entities can be specified, e.g. 'Node:BEN,HAY,OTA' will create a division for each of the three named nodes.

Date/Time Divisions:

  • hh - half hourly
  • 1h, 2h, 3h, 4h, 6h, 8h - one, two, three, four, six and eight hourly
  • DN - Day Night (12pm-8am, 8am-12pm)
  • DN6 - Day Night (12pm-6am, 6am-12pm)
  • WO - 2 divisions: Weekday, Other day
  • WODN - 4 divisions: Week day, Other day, Week night, Other night (Day, Night as in DN)
  • WODN6 - 4 divisions: Week day, Other day, Week night, Other night (Day, Night as in DN6)
  • DOW - 7 Divisions - day of week
  • MonthOfYear - 12 Divisions - one for each month in the year
  • Day - A division for each day in the forecast
  • Week - A division for each week in the forecast
  • Month - A division for each month in the forecast
  • Year - A division for each year in the forecast
  • Date - A division by user entered dates. For example 'Date:1 Apr 2015, 1 Nov 2015, 1 Jan 2016' will create four divisions separated by the three dates specified

Using The Output Specification Window

To create a new OS open Output Specs by clicking on the OutputSpec tab at the bottom left of the main page. Press <insert> to open a clean OS Window. Fill out the fields in the box at the top of the new window by pressing space to activate the cell and then typing the required information.

To create the first Column or first Row Partition highlight the Column or Row Partition heading by clicking on it and then pressing <Ctrl><Insert> to create a new blank Column or Row partition.

To create subsequent Column or Row Partitions right click an existing Column or Row Partition and select the required item from the drop down menu:

  • Sibling Partitions can be created with the Insert Before option.
  • Parent Partitions can be created (making a child of the highlighted partition) with the Insert Parent option.
  • Child Partitions can be created (making a parent of the highlighted partition) with the Insert Child option.


To enter Partition details press the <space> key to activate the cell and start entering text.


If EMarket cannot validate the entry the text will simply revert to what was in the division beforehand. An entry may not be validated because:

  • incorrect syntax
  • invalid data-type or time-type


Warning: The specifications are case sensitive, and for function names, data types and time types, name completion is provided.


Back to Resources

Back to Outputs