add power supply and transmission overheads to OperationalEmissions#154
Merged
jnioche merged 3 commits intoDigitalPebble:mainfrom Mar 2, 2026
Merged
add power supply and transmission overheads to OperationalEmissions#154jnioche merged 3 commits intoDigitalPebble:mainfrom
jnioche merged 3 commits intoDigitalPebble:mainfrom
Conversation
…nalEmissions and refactor the corresponding test
jnioche
requested changes
Feb 28, 2026
Member
jnioche
left a comment
There was a problem hiding this comment.
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!
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.
Member
|
thanks @dpol1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in the issue #153, this PR adds the new overhead factors to the
OperationalEmissionsmodule to properly account for power supply and transmission losses.Changes included:
powerSupplyEfficiency(default1.04) andpowerTransmissionLosses(default1.08) variables to theOperationalEmissionsclass.powerSupplyEfficiencyandpowerTransmissionLossesvia theinitmethod. This allows for runtime configuration of these values, improving flexibility for operational emissions calculations.enrich()method to include these new factors in the final emissions calculation (emissions = energyUsed * carbonIntensity * totalOverhead).OperationalEmissionsTestto expect the new computed values, adding a0.0001delta toassertEqualsto correctly handle floating-point precision differences.