Skip to content

add power supply and transmission overheads to OperationalEmissions#154

Merged
jnioche merged 3 commits intoDigitalPebble:mainfrom
dpol1:feat/power-overheads
Mar 2, 2026
Merged

add power supply and transmission overheads to OperationalEmissions#154
jnioche merged 3 commits intoDigitalPebble:mainfrom
dpol1:feat/power-overheads

Conversation

@dpol1
Copy link
Contributor

@dpol1 dpol1 commented Feb 28, 2026

As discussed in the issue #153, this PR adds the new overhead factors to the OperationalEmissions module to properly account for power supply and transmission losses.

Changes included:

  • Added powerSupplyEfficiency (default 1.04) and powerTransmissionLosses (default 1.08) variables to the OperationalEmissions class.
  • Introduces the ability to set powerSupplyEfficiency and powerTransmissionLosses via the init method. This allows for runtime configuration of these values, improving flexibility for operational emissions calculations.
  • Updated the enrich() method to include these new factors in the final emissions calculation (emissions = energyUsed * carbonIntensity * totalOverhead).
  • Updated OperationalEmissionsTest to expect the new computed values, adding a 0.0001 delta to assertEquals to correctly handle floating-point precision differences.
  • Update the docs for the module

…nalEmissions and refactor the corresponding test
Copy link
Member

@jnioche jnioche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dpol1, this is a good start!
Please modify the part of the documentation that describes the module + explain what we mean by these two things.
The values should also be taken from the configuration as part of the init like done in pretty much every other module. As for adding get() / set(), this is not how the configuration works, see for instance ConstantLoad
Thanks!

@jnioche jnioche added the enhancement New feature or request label Mar 1, 2026
@jnioche jnioche added this to the 0.9 milestone Mar 1, 2026
dpol1 added 2 commits March 2, 2026 09:32
Introduces the ability to set `powerSupplyEfficiency` and `powerTransmissionLosses` via the `init` method. This allows for runtime configuration of these values, improving flexibility for operational emissions calculations.

Removes redundant setter methods as these parameters are now designed for initial setup.
@jnioche
Copy link
Member

jnioche commented Mar 2, 2026

thanks @dpol1
I will add the params to the default config file for consistency and as a way of documenting

@jnioche jnioche merged commit 23399f9 into DigitalPebble:main Mar 2, 2026
2 checks passed
@dpol1 dpol1 deleted the feat/power-overheads branch March 2, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants