# Calculation Logic

## Introduction <a href="#introduction" id="introduction"></a>

Companies often disclose energy data in fragments. One company might report only *non-renewable energy consumed*, another might provide a *total energy consumption* figure without any breakdown, while a third might disclose *energy produced* but omit what portion was consumed or exported. On their own, these disclosures are incomplete and inconsistent, making them difficult to compare.

To address this, Tracenable applies a transparent accounting system that reconstructs the relationships between reported metrics to form a consistent, comparable dataset.

This system does not “guess” or “predict” missing numbers. Instead, it uses structured logic based on how energy data behaves across its analytical dimensions. Every calculated value is flagged, traceable, and auditable, so users always know what has been reported, derived, or inferred.

This approach ensures that even when companies report partial information, Tracenable can produce a complete, verifiable picture of their energy profile, without making assumptions or altering the original data.

***

## The Foundation: Hierarchical Relationships <a href="#hierarchical-relationships" id="hierarchical-relationships"></a>

Energy data is inherently hierarchical. Every aggregated figure can be broken down into smaller parts, or child metrics, and those parts can often be summed back up into parent metrics.

For example

* *Total Energy Consumed* can be calculated as the sum of *Renewable Energy Consumed* and *Non-Renewable Energy Consumed*.
* *Total Energy Consumed* can also be expressed as the sum of *Electricity Consumed*, *Heat Consumed*, *Raw Resources Consumed*, and *Other Energy Types Consumed.*
* Alternatively, it can be derived from the sum of all company-reported energy sources (e.g., *natural gas + diesel + biomass + electricity*).

This hierarchical logic enables Tracenable to validate totals, fill gaps, and standardize disclosures across companies, even when the original data is incomplete.

***

## Core Rules of Calculation

To maintain consistency and reliability, Tracenable’s accounting logic is built on two simple but powerful computational rules.

### <mark style="color:$info;">Rule 1: Bottom-up Computation (Sum of Children)</mark> <a href="#rule-1-bottom-up-computation-sum-of-children" id="rule-1-bottom-up-computation-sum-of-children"></a>

When the parent metric of a dimension is missing but its components are disclosed, the parent can be calculated as the sum of all available children.

**Examples**

* *Total Energy Renewability = Renewable Energy + Non-Renewable Energy*
* *Total Energy Type = Electricity + Heat + Other Energy Types*
* *Total Energy Level = Sum of all company-reported energy sources*

{% hint style="success" %}
This ensures that totals are constructed whenever sufficient detail exists, without discarding any company-reported information.
{% endhint %}

### <mark style="color:$info;">Rule 2: Top-Down Computation (Subtraction)</mark> <a href="#rule-2-top-down-computation-subtraction" id="rule-2-top-down-computation-subtraction"></a>

Sometimes, the situation is reversed: the parent is disclosed, but one of the children is missing. In these cases, the missing value can be inferred by subtraction, but only if the parent and all other children of that dimension are known.

**Examples**

* Renewable Energy = *Total Energy Renewability* − *Non-Renewable*
* Non-Renewable Energy = *Total Energy Renewability* − *Renewable*
* Produced Energy = *Total Energy Inflow* − *Purchased Energy*
* Purchased Energy = *Total Energy Inflow* − *Produced Energy*

{% hint style="info" %}
Top-down logic is only applied to dimensions with unambiguous additive relationships, namely:

* Renewability (Renewable + Non-Renewable = Total)
* Inflow (Produced + Purchased = Total Inflow)

Other dimensions, such as Energy Source or Energy Type, are unsuitable for top-down inference because their aggregate is made up of three or more options (e.g., solar, wind, hydro for sources; electricity, heat, fuel for types), which prevents a unique and reliable subtraction.
{% endhint %}

This careful application ensures that every computed value is both logical and reliable, avoiding the risk of introducing misleading data.

{% hint style="success" %}
Together, these two rules (bottom-up addition and top-down subtraction) define the mathematical backbone of Tracenable’s Directed Acyclic Graph (DAG) (see next section).

Every computation within the Energy dataset follows these same principles: the DAG uses *Rule 1* to aggregate metrics upward whenever possible, and applies *Rule 2* selectively when complete parent–child relationships allow for reliable subtraction.

This ensures that the hierarchical graph described in the next section behaves consistently with the accounting logic introduced here.
{% endhint %}

***

## The Graph Model: How Energy Data Is Structured

Behind the scenes, Tracenable represents all energy metrics as part of a Directed Acyclic Graph (DAG), a hierarchical structure that applies the same bottom-up and top-down rules described in the previous section.&#x20;

The DAG defines how every metric connects to others through five hierarchical dimensions:

1. **Energy Type** – electricity, heat, raw resources (e.g. fuel) or total energy
2. **Inflow** – how energy enters the system (produced, purchased, or total inflow).
3. **Outflow** – how energy exits or is used (consumed, sold, reserved, or total outflow).
4. **Renewability** – renewable, non-renewable, or total.
5. **Source or Technology** – the specific origin or generation method (e.g., solar, hydropower, diesel, or unknown).

Each metric in the Energy dataset corresponds to a unique combination of these five dimensions. And within any given metric, every dimension has a **Dimensional Resolution**, meaning it can be either:

* **Specific** – when the dimension refers to a particular value (e.g., Renewability = *Renewable*, Inflow = *Produced*, Energy type = *Electricity*), or
* **Aggregated** – when the dimension represents the total across all its specific values (e.g., Renewability = *Total* (Renewable + Non-Renewable), Inflow = Total (Produced + Purchased).

### Depth Hierarchy

The combination of specific and aggregated dimensions defines the position (or depth) of each metric in the DAG:

* A metric with all five dimensions ***specific*** sits at the deepest level (Depth 6): it is the most granular form of energy data.
* A metric with all five dimensions *aggregated* sits at the root (Depth 1): representing *Total Energy*, the sum of all energy outflows from all inflows, across all types, renewability classes, and sources or technologies.

This concept of Dimensional Resolution ensures that all energy data, whether reported in fragments or fully detailed, fits coherently within a single, logical structure, allowing Tracenable to calculate totals, identify gaps, and maintain perfect traceability from the most granular disclosures to the highest-level aggregates.

<table><thead><tr><th width="90.07421875">Depth</th><th width="244.37109375">Description</th><th>Example of Reported Metric</th></tr></thead><tbody><tr><td>6</td><td>None of the dimensions are aggregated / All dimensions are specifics</td><td>Renewable Electricity Produced from Hydropower for Consumption</td></tr><tr><td>5</td><td>One dimension are aggregated  / Four dimensions are specifics</td><td>Renewable Electricity Produced for Consumption</td></tr><tr><td>4</td><td>Two dimensions are aggregated / Three dimensions are specifics</td><td>Electricity Produced for Consumption</td></tr><tr><td>3</td><td>Three dimensions are aggregated /  Two dimensions are specifics</td><td>Total Renewable Heat</td></tr><tr><td>2</td><td>Four dimensions are aggregated /  One dimension is specific</td><td>Total Energy Consumed</td></tr><tr><td>1</td><td>All dimensions are aggregated  / None dimensions are specifics</td><td>Total Energy</td></tr></tbody></table>

### Computational Logic with the Hierarchical DAG

Each step upward in the DAG aggregates all compatible child metrics one level below, collapsing any one dimension while keeping others equal and constant (ceteris paribus). In other words, for two metrics to be summed together, they must share four identical dimensions, and the fifth dimension must be the one being aggregated.

This ensures that only comparable metrics are summed. For example, two energy values may be summed if they refer to the same energy type, inflow, outflow, and renewability, while differing only in source or technology. The resulting total then represents the aggregate for that dimension (e.g., *Total Sources*).

While most relationships in the DAG are additive (bottom-up sums), certain parent–child pairs, specifically along the *Renewability* and *Inflow* dimensions, can also operate in reverse using the top-down subtraction rule outlined in Section 2.

Together, this bidirectional logic creates a robust, traceable network of relationships that can reconstruct a company’s entire energy profile from the bottom up, or, where possible, verify it from the top down.

#### <mark style="color:$success;">**Illustrative Example:**</mark>

Suppose a company reports only two values:

* *Renewable Electricity Produced from Hydropower:* 200 GJ, and
* *Non-Renewable Electricity Purchased:* 300 GJ,

both of which are used for consumption during the year.

#### **Reported values (Depth 6):**

Both reported values above sit at depth 6, since all five dimensions are specific.

<table data-full-width="true"><thead><tr><th>Energy (GJ)</th><th>Type</th><th>Inflow</th><th>Outflow</th><th>Renewability</th><th>Source/Technology</th></tr></thead><tbody><tr><td>200</td><td>Electricity</td><td>Produced</td><td>Consumed</td><td>Renewable</td><td>Hydropower</td></tr><tr><td>300</td><td>Electricity</td><td>Purchased</td><td>Consumed</td><td>Non-Renewable</td><td>Unknown</td></tr></tbody></table>

From these two detailed metrics, the DAG systematically aggregates upward across multiple depths — first across single dimensions (Depth 5), then across combinations (Depth 4–2), until reaching the top-level *Total Energy* node (Depth 1).

At every level, the same logical conditions apply: only metrics with compatible dimensions can be aggregated, and when necessary, top-down subtraction ensures the integrity of renewability or inflow balances.

#### **Depth 5 - Aggregations of Depth-6 Metrics**

Metrics from depth 6 are aggregated upward to depth 5 by collapsing one additional dimension at a time while keeping all others equal and constant (ceteris paribus).

From the two reported values above, we can compute the following parent metrics:

<table data-full-width="true"><thead><tr><th width="97.9765625">Energy (GJ)</th><th width="101.2890625">Energy Type</th><th width="113.07421875">Inflow</th><th width="128.3359375">Outflow</th><th>Renewability</th><th>Source / Technology</th><th>Aggregated Dimension</th></tr></thead><tbody><tr><td>200</td><td>Electricity</td><td>Produced</td><td>Consumed</td><td>Renewable</td><td>Total Sources</td><td>Source</td></tr><tr><td>300</td><td>Electricity</td><td>Purchased</td><td>Consumed</td><td>Non-Renewable</td><td>Total Sources</td><td>Source</td></tr><tr><td>200</td><td>Electricity</td><td>Produced</td><td>Consumed</td><td>Total Renewability</td><td>Hydropower</td><td>Renewability</td></tr><tr><td>300</td><td>Electricity</td><td>Purchased</td><td>Consumed</td><td>Total Renewability</td><td>Unknown</td><td>Renewability</td></tr><tr><td>200</td><td>Electricity</td><td>Total Inflow</td><td>Consumed</td><td>Renewable</td><td>Hydropower</td><td>Inflow</td></tr><tr><td>300</td><td>Electricity</td><td>Total Inflow</td><td>Consumed</td><td>Non-Renewable</td><td>Unknown</td><td>Inflow</td></tr><tr><td>200</td><td>Electricity</td><td>Produced</td><td>Total Outflow</td><td>Renewable</td><td>Hydropower</td><td>Outflow</td></tr><tr><td>300</td><td>Electricity</td><td>Purchased</td><td>Total Outflow</td><td>Non-Renewable</td><td>Unknown</td><td>Outflow</td></tr><tr><td>200</td><td>Total Energy</td><td>Produced</td><td>Consumed</td><td>Renewable</td><td>Hydropower</td><td>Energy Type</td></tr><tr><td>300</td><td>Total Energy</td><td>Purchased</td><td>Consumed</td><td>Non-Renewable</td><td>Unknown</td><td>Energy Type</td></tr></tbody></table>

At this level, every metric combines four specific dimensions and one aggregated dimension.  This step produces a richer set of intermediate totals,  bridging between detailed source-specific disclosures and broader operational aggregates.

Each row represents a new parent node at depth 5, one level closer to full aggregation.

#### **Depth 4 – Aggregations of Depth-5 Metrics**

Metrics from depth 5 are aggregated upward to depth 4 by collapsing one additional dimension at a time, while keeping the remaining four equal and constant (ceteris paribus).

From the depth-5 metrics above, we can compute the following parent metrics (note: a few metrics only are showcased for illustration purposes):

<table data-full-width="true"><thead><tr><th>Energy (GJ)</th><th>Energy Type</th><th>Inflow</th><th>Outflow</th><th>Renewability</th><th>Source / Technology</th></tr></thead><tbody><tr><td>200</td><td>Electricity</td><td>Produced</td><td>Consumed</td><td>Total Renewability</td><td>Total Sources</td></tr><tr><td>300</td><td>Electricity</td><td>Purchased</td><td>Consumed</td><td>Total Renewability</td><td>Total Sources</td></tr><tr><td>200</td><td>Electricity</td><td>Total Inflow</td><td>Consumed</td><td>Renewable</td><td>Total Sources</td></tr><tr><td>300</td><td>Electricity</td><td>Total Inflow</td><td>Consumed</td><td>Non-Renewable</td><td>Total Sources</td></tr><tr><td>200</td><td>Total Energy</td><td>Produced</td><td>Consumed</td><td>Renewable</td><td>Total Sources</td></tr><tr><td>300</td><td>Total Energy</td><td>Purchased</td><td>Consumed</td><td>Non-Renewable</td><td>Total Sources</td></tr><tr><td>200</td><td>Total Energy</td><td>Produced</td><td>Consumed</td><td>Total Renewability</td><td>Total Sources</td></tr><tr><td>300</td><td>Total Energy</td><td>Purchased</td><td>Consumed</td><td>Total Renewability</td><td>Total Sources</td></tr></tbody></table>

At this stage, broader categories emerge; bridging the gap between detailed disclosures and operational summaries.

Each metric at depth 4 therefore combines three specific dimensions and two aggregated ones, resulting in totals that describe higher-level patterns such as *Total Energy Produced and Consumed (Renewable, Total Sources)* or *Electricity Consumed (Total Renewability, Total Sources)*.

**Depth 3 – Aggregations of Depth-4 Metrics**

Metrics from depth 4 are then aggregated again, collapsing one more dimension at a time.

By this point, most dimensions are aggregated, leaving only two still specific.

From the depth-54metrics above, we can compute the following parent metrics (note: a few metrics only are showcased for illustration purposes):

| Energy (GJ) | Energy Type  | Inflow       | Outflow       | Renewability       | Source / Technology |
| ----------- | ------------ | ------------ | ------------- | ------------------ | ------------------- |
| 200         | Electricity  | Total Inflow | Total Outflow | Renewable          | Total Sources       |
| 300         | Electricity  | Total Inflow | Total Outflow | Non-Renewable      | Total Sources       |
| 500         | Electricity  | Total Inflow | Total Outflow | Total Renewability | Total Sources       |
| 200         | Total Energy | Produced     | Total Outflow | Renewable          | Total Sources       |
| 300         | Total Energy | Purchased    | Total Outflow | Non-Renewable      | Total Sources       |
| 500         | Total Energy | Total Inflow | Total Outflow | Total Renewability | Total Sources       |

Depth 3 introduces familiar operational totals such as Total *Electricity Consumed*, *Total Renewable Energy Produced*, or *Total Heat Purchased*.

#### Depth 2 – Aggregations of Depth-3 Metrics

At depth 2, four of the five dimensions are aggregated, leaving typically only one still specific.

This level yields totals such as *Total Energy Consumed, Total Renewable Energy, Total Energy Produced;* metrics that represent a company’s complete energy flow for a specific form or direction of energy.

<table data-full-width="true"><thead><tr><th>Energy (GJ)</th><th>Energy Type</th><th>Inflow</th><th>Outflow</th><th>Renewability</th><th>Source / Technology</th></tr></thead><tbody><tr><td>500</td><td>Electricity</td><td>Total Inflow</td><td>Total Outflow</td><td>Total Renewability</td><td>Total Sources</td></tr><tr><td>500</td><td>Total Energy</td><td>Total Inflow</td><td>Consumed</td><td>Total Renewability</td><td>Total Sources</td></tr><tr><td>500</td><td>Total Energy</td><td>Produced</td><td>Total Outflow</td><td>Total Renewability</td><td>Total Sources</td></tr></tbody></table>

#### Depth 1 – Aggregations of Depth-2 Metrics

Finally, all remaining dimensions are aggregated into the single top-level metric: Total Energy.

This node represents the sum of all energy outflows (consumed, sold, reserved) from all inflows (produced, purchased), across all energy types, renewability categories, and technologies.

<table data-full-width="true"><thead><tr><th>Energy (GJ)</th><th>Energy Type</th><th>Inflow</th><th>Outflow</th><th>Renewability</th><th>Source / Technology</th></tr></thead><tbody><tr><td>500</td><td>Total Energy</td><td>Total Inflow</td><td>Total Outflow</td><td>Total Renewability</td><td>Total Sources</td></tr></tbody></table>

The root node acts as the apex of the entire Directed Acyclic Graph.

{% hint style="success" %}

#### Summary: Why the Hierarchical DAG Matters

By structuring all energy metrics within a hierarchical DAG, Tracenable guarantees that every number - no matter how aggregated - remains traceable, logical, and reproducible.

This approach delivers four key benefits:

1. **Completeness** – All available data contributes to a coherent system; totals can be derived even when reports are fragmented.
2. **Consistency** – All metrics follow the same additive and hierarchical rules across dimensions.
3. **Traceability** – Each aggregated value can be decomposed back to the underlying company-reported metrics.
4. **Comparability** – Standardized structures allow apples-to-apples benchmarking across companies, sectors, and reporting years.

\
Tracenable’s calculation logic therefore turns heterogeneous, partial energy disclosures into a unified, audit-ready dataset—one where every total has context, every relationship is mathematically sound, and every computation is transparent.
{% endhint %}

***
