Entity.Traits

From EMK Wiki
Revision as of 13:37, 19 November 2012 by Sisep (talk | contribs)
Jump to navigation Jump to search

When a run is executed a set of binary files is created in a 'database' folder under the results directory (see Physical Architecture). These files are collectively called the Results database, and their internal structure reflects EMarket's Entity.Trait data model. This model captures EMarket's approach to data handling in which objects of interest - such as Generators or Nodes - are called entities, and the values describing an entity are its traits (e.g. Nodal Price or Generator Name).


An entity is a logical concept that represents a 'thing' about which EMarket needs to keep data. Things with similar modelling characteristics are classed under the same Entity type. In other words, Entities are typed by the object they represent in the 'modelled' world (e.g. 'Node' or 'Generator'). Different objects of the same entity type are called instances of the entity. So, for example, ABY and TKU are instances of the entity type: Node.

The characteristics describing an entity are its traits. In data handling terms it is the traits that differentiate Instances of the same entity type. The trait 'Node.Name', for example, differentiates the 'ABY' Node entity instance from the 'TKU' Node entity instance.

In EMarket entities and traits are given names that can be used to reference specific data items in the Run Definitions and their values in the associated output. Within a Run Definition Entity.Trait references can be used in any data entry field that accepts a formula expression (the Schedule and all Resource editors). The value of these expressions is calculated at run time and may vary significantly from Tick to Tick, especially if the formula refers to traits derived during the previous Tick.

Entity.Traits syntax: <entity>:<name of particular entity>.<trait>

E.g. Reference to the electricity generated by Generator: GEN01 for a specific period would look like this: Generator:GEN01.Generation

Warning: Entity.Trait references are case sensitive.