The estimation folder contains modules and classes related to the estimation process.
classDiagram
direction LR
namespace TCS-categories {
class estimate-upstream-emissions{
<<module>>
+estimateUpstreamEmissions(deviceUsage: DeviceUsage[]) UpstreamEstimation
}
class estimate-direct-emissions{
<<module>>
+estimateDirectEmissions(deviceUsage: DeviceUsage[]) DirectEstimation
}
class estimate-indirect-emissions{
<<module>>
+estimateIndirectEmissions(input: Cloud, intensity: gCo2ePerKwh) IndirectEstimation
}
class estimate-downstream-emissions{
<<module>>
+siteTypeInfo: Record~PurposeOfSite, SiteInformation~
+estimateDownstreamEmissions(downstream: Downstream, ...) DownstreamEstimation
}
}
namespace supporting-modules{
class device-usage {
<<module>>
+DeviceUsage: interface
+createDeviceUsage(type: DeviceType, ...) DeviceUsage
}
class device-type {
<<module>>
+laptop: DeviceType
+desktop: DeviceType
+server: DeviceType
+network: DeviceType
+mobile: DeviceType
+tablet: DeviceType
+monitor: DeviceType
+averagePersonalComputer: AverageDeviceType
+DeviceType(...)
+AverageDeviceType(...shares: DeviceShare[])
}
class estimate-energy-emissions {
<<module>>
+estimateEnergyEmissions(...) KgCo2e
}
}
estimate-upstream-emissions ..> device-usage
estimate-direct-emissions ..> device-usage
estimate-indirect-emissions ..> estimate-energy-emissions
estimate-downstream-emissions ..> device-type
estimate-downstream-emissions ..> estimate-energy-emissions
device-usage ..> device-type
device-usage ..> estimate-energy-emissions
Estimate emissions from Upstream categories
deviceUsage:
DeviceUsage
[]
- The Device usage to estimate upstream emissions for.
UpstreamEstimation
- Estimation of Upstream emissions under TCS categories.
Estimate emissions from Direct categories
deviceUsage:
DeviceUsage
[]
- The Device usage to estimate direct emissions for.
DirectEstimation
- Estimation of Direct emissions under TCS categories.
Estimate emissions from Indirect categories
input:
Cloud
- The inputs relevant to cloud.
intensity:
gCo2ePerKwh
- The Carbon intensity of the cloud region.
IndirectEstimation
- Estimation of Indirect emissions under TCS categories.
Exported to allow use in assumptions component.
classDiagram
class SiteInformation {
<<interface>>
averageMonthlyUserTime: Hour
averageMonthlyUserData: Gb
}
Estimate emissions from Downstream categories
downstream:
Downstream
- The inputs relevant to downstream emissions.
intensity:
gCo2ePerKwh
- The Carbon intensity of the downstream region.
DownstreamEstimation
- Estimation of Downstream emissions under TCS categories.
classDiagram
direction TB
class DeviceType {
-averagePower: Watt
-averageYearlyUsage: Hour
-averageEmbodiedCarbon: KgCo2e
-averageLifespan: Year
+constructor(averagePower: Watt, averageYearlyUsage: Hour, averageEmbodiedCarbon: KgCo2e, averageLifespan: Year)
+estimateYearlyEnergy(deviceCount: number) KilowattHour
+estimateEnergy(usage: Hour) KilowattHour
+estimateYearlyUpstreamEmissions(deviceCount: number): KgCo2e
+estimateYearlyUpstreamEmissionsForLifespan(deviceCount: number, lifespan: Year) KgCo2e
}
class AverageDeviceType {
-averagePower: Watt
-averageYearlyUsage: Hour
-averageEmbodiedCarbon: KgCo2e
-averageLifespan: Year
+constructor(...shares: DeviceShare[])
+estimateYearlyEnergy(deviceCount: number) KilowattHour
+estimateEnergy(usage: Hour) KilowattHour
+estimateYearlyUpstreamEmissions(deviceCount: number): KgCo2e
+estimateYearlyUpstreamEmissionsForLifespan(deviceCount: number, lifespan: Year) KgCo2e
}
class DeviceShare {
+device: DeviceType
+percentage: number
}
DeviceType <|-- AverageDeviceType
AverageDeviceType ..> DeviceShare
DeviceShare ..> DeviceType
The DeviceType
class performs calculations based on average power, usage, embodied carbon, and lifespan. This module also exports multiple types of devices with different averages.
Estimates the energy a given amount of devices will use in a year.
deviceCount: number
- The number of devices.
KilowattHour
- The estimated amount of energy used.
Estimates the energy a device would use over a given amount of hours.
usage: Hour
- The amount of hours the device is used for.
KilowattHour
- The estimated amount of energy used.
Estimates the yearly upstream emissions of a given number of devices.
deviceCount: number
- The number of devices.
KgCo2e
- The estimated upstream emissions.
Estimates the yearly upstream emissions of a given number of devices with a specific lifespan.
deviceCount: number
- The number of devices.
lifespan:
Year
- The desired lifespan of the device.
KgCo2e
- The estimated upstream emissions.
Exported to allow use in various calculations.
Exported so that DeviceUsage
can reference the type internally. This module also exports multiple types of devices with different averages.
Exported to allow an average device to be created based on mobile end-user ratio.
classDiagram
class DeviceUsage {
<<interface>>
estimateUpstreamEmissions() KgCo2e
estimateDirectEmissions() KgCo2e
category: DeviceCategory
}
Exported to be used as parameter for upstream and direct estimation functions.
Creates device usage without exposing the exact method of calculation.
type:
DeviceType
- The type of device being used.
category:
DeviceCategory
- The category the device usage falls under.
intensity:
gCo2ePerKwh
- The carbon intensity of the region the devices are being used in.
count: number
- The number of devices being used.
pue?: number
- The Power Usage Effectiveness of the device usage (optional, defaults to 1).
DeviceUsage
- used to calculate the upstream and direct emissions of devices.
Estimate emissions from energy used in a location.
energy:
KilowattHour
- Amount of energy used.
intensity:
gCo2ePerKwh
- The Carbon Intensity of the region where the energy was used.
KgCo2e
- Kg of CO2e emitted via energy use.