How energiacte/cteepbd works
CteEPBD is a Rust library and CLI for assessing building energy performance under EN ISO 52000-1 and Spanish CTE conventions. Its main workflow reads energy-component data and weighting factors, calculates delivered, produced, used and exported energy, then derives area-normalized primary-energy and CO₂ indicators for display or export. The README also documents renewable ACS-demand reporting and plain/XML output. Core calculation and output wiring are based on the README and sampled excerpts; unsampled module internals are represented only where their role is supported by the tree and documentation.
Main entry points: cteepbd.rs CLI · components.rs Component parser · balance.rs Carrier balance · mod.rs Balance results
Components 17
Inputs and configuration
- Component parser
src/components.rs - CTE defaults
src/cte.rs - Weighting factors
src/wfactors.rs
Energy model
- Energy components
src/types/energy/elements.rs - Building needs
src/types/needs/mod.rs - Domain types
src/types/mod.rs
Assessment calculation
- Carrier balance
src/balance.rs - Balance results
src/types/balance/mod.rs - Overall balance
src/types/balance/all_carriers.rs - Performance indicators
src/types/balance/energy_performance.rs
Results and formats
- Plain output
src/asplain.rs - CTE XML output
src/asctexml.rs
Other components
- CLI user
- Component data
- Factor data
- CLI
src/bin/cteepbd.rs - Assessment results
Connections 17
- CLI user → CLI: invokes
- Component data → CLI: provides data
- Factor data → CLI: provides factors
- CLI → Component parser: parses components
- CLI → CTE defaults: selects defaults
- CLI → Weighting factors: loads factors
- Component parser → Energy components: builds components
- Component parser → Building needs: reads demand
- CLI → Carrier balance: calculates balance
- Carrier balance → Weighting factors: applies factors
- Carrier balance → Balance results: produces balances
- Balance results → Overall balance: aggregates carriers
- Overall balance → Performance indicators: derives indicators
- CLI → Plain output: formats results
- CLI → CTE XML output: formats results
- Plain output → Assessment results: renders
- CTE XML output → Assessment results: serializes