airmosaic-ai

Technology Component Decomposition Logic

How sector costs are decomposed into technology-level components: energy, non-energy, capital, carbon, and residual.

Why Component Decomposition

sector/cost is a single number per sector per year per region. But it aggregates contributions from multiple technologies with different cost structures. Component decomposition breaks the sector cost into:

Technology Cost Weighting

Technology costs are weighted by physical output to match the sector level:

weighted_tech_cost = sum(tech_cost_i * output_proxy_i) / sum(output_proxy_i)
weighted_sector_cost = sector_cost * sum(output_proxy_i) / sum(all_output_i)

Where output_proxy_i is the physical output of technology i (from output-primary/physical-output).

Component Categories

Input Components (energy/materials)

For each technology/input node with demand-physical:

component_cost = io_coefficient * component_unit_price * tech_output

Non-Energy Components

From technology/StubTechCost or equivalent:

Carbon Cost Components

carbon_cost = co2_price * co2_emissions

Where:

Secondary Credit

From technology/output-secondary/physical-output:

secondary_credit = secondary_output * secondary_price

This offsets sector cost (negative value).

Residual

residual = weighted_tech_cost - sum(all_tracked_components)

A large residual indicates untracked cost elements or weighting mismatch.

Generic vs Transport Methods

Generic Method

Used for most industrial sectors (cement, iron and steel, ammonia, etc.):

  1. Iterate over technology/input nodes
  2. Look up input prices from marketplace or upstream sectors
  3. Calculate component costs from coefficients * prices * output
  4. Sum non-energy, energy, carbon, secondary

Transport Method

Transport sectors use TranTechnology nodes with different structure:

# Transport uses load-factor and direct price paid
component_cost = load_factor * direct_price_paid * tech_output

Key differences:

Upstream Cost Lookup

For energy input prices, the decomposition looks up:

  1. Marketplace prices: Marketplace/market/price for the input fuel/good
  2. Upstream sector cost: If no marketplace price is found, use the producing sector’s sector/cost
  3. Fallback: Mark price source as not_found

The lookup is recursive: if sector A uses input from sector B, and sector B’s price comes from marketplace, the decomposition traces this chain.

Quality Assessment

After decomposition, assess quality:

Quality Condition
good Residual < 10% of weighted_tech_cost
acceptable Residual < 25%
poor Residual >= 25% or missing major components

Large residuals suggest:

Key Relationship

weighted_tech_cost ≈ energy_material + non_energy + capital_om + co2_cost + secondary_credit + residual
weighted_sector_cost ≈ sum of all technology contributions reweighted to sector level

weighted_sector_cost may differ from selected_unit_price because: