Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case study models #141

Merged
merged 70 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
881a3e6
Adding e-shoppen models
gnanakeethan Sep 12, 2023
3302596
Fix tests
gnanakeethan Sep 12, 2023
7751b01
initial commit for e-mem model
jmcook1186 Sep 12, 2023
df794d2
return `e-mem` instead of `energy`
jmcook1186 Sep 12, 2023
952eb96
change out name energy -> e-mem
jmcook1186 Sep 12, 2023
720e100
changing according to standards
gnanakeethan Sep 12, 2023
1eae7e9
adding sci-accenture model
gnanakeethan Sep 12, 2023
294acbf
adds e-net model
jmcook1186 Sep 12, 2023
41377ce
fix comments
jmcook1186 Sep 12, 2023
abf4af6
initial commit for e-mem model
jmcook1186 Sep 12, 2023
86fa846
return `e-mem` instead of `energy`
jmcook1186 Sep 12, 2023
44b1b3b
change out name energy -> e-mem
jmcook1186 Sep 12, 2023
80ce02c
changing according to standards
gnanakeethan Sep 12, 2023
88e8b92
add sci-e model
jmcook1186 Sep 12, 2023
e108592
fix linter
jmcook1186 Sep 12, 2023
9d0af87
Fixing naming
gnanakeethan Sep 13, 2023
bcc0463
add sci model (time and factor conversions)
jmcook1186 Sep 13, 2023
60d0117
fix linter
jmcook1186 Sep 13, 2023
36073f2
equal --> strict equal
jmcook1186 Sep 13, 2023
159e434
Rename operational-emissions to operational-carbon
gnanakeethan Sep 13, 2023
7df6187
typo fixes
gnanakeethan Sep 13, 2023
543f168
Yarn fixes
gnanakeethan Sep 13, 2023
924ab70
Fixing naming
gnanakeethan Sep 13, 2023
e1a7886
Fixing operational pipeline changes
gnanakeethan Sep 13, 2023
587c2ae
yarn fixes
gnanakeethan Sep 13, 2023
c186f1d
add aveva model
jmcook1186 Sep 13, 2023
8dd4940
fix linter
jmcook1186 Sep 13, 2023
95cfda5
rm .js, + .ts files
jmcook1186 Sep 13, 2023
7295cbd
yarn fix
jmcook1186 Sep 13, 2023
b6792df
fix comments
jmcook1186 Sep 13, 2023
58f9225
yarn fix
jmcook1186 Sep 13, 2023
8b5a7d5
Remove teads ref
gnanakeethan Sep 13, 2023
fab3325
Fix naming
gnanakeethan Sep 13, 2023
8dd0d75
Remove unnecessary js map
gnanakeethan Sep 13, 2023
4011eea
remove newline
gnanakeethan Sep 13, 2023
456a02d
Pipeline fixes
gnanakeethan Sep 13, 2023
6ffb832
Merge imports
gnanakeethan Sep 13, 2023
603b813
Fixing: imports
gnanakeethan Sep 13, 2023
4671e68
naming fix
gnanakeethan Sep 13, 2023
2410f92
Allow expanded names in sci-m models
gnanakeethan Sep 13, 2023
f4f26bb
adds aveva model
jmcook1186 Sep 13, 2023
434e695
fix grid-ci value
jmcook1186 Sep 13, 2023
00ca9fc
unit fix
jmcook1186 Sep 13, 2023
2ee7a85
update impl
jmcook1186 Sep 13, 2023
69874f5
yarn fix
jmcook1186 Sep 13, 2023
3414bac
adjust expedcted value in test
jmcook1186 Sep 13, 2023
d12ab50
add accenture model
jmcook1186 Sep 15, 2023
a57431b
fix linter
jmcook1186 Sep 15, 2023
e6f2574
fix unit test
jmcook1186 Sep 15, 2023
1734d6d
Fixing e-cpu field on the BoaviztaCpuImpactModel
gnanakeethan Sep 15, 2023
e342087
.eslintignore: add src d.ts, js files.
narekhovhannisyan Sep 15, 2023
f32734b
ccf: apply linter to jsons.
narekhovhannisyan Sep 15, 2023
64eb208
config: init model ids.
narekhovhannisyan Sep 15, 2023
e02f965
lib: re-export all models from index.
narekhovhannisyan Sep 15, 2023
a33444d
lib: restructure boavizta imports, id.
narekhovhannisyan Sep 15, 2023
7f0b0ff
lib: restucture case studies.
narekhovhannisyan Sep 15, 2023
b6a9713
lib: restucture ccf.
narekhovhannisyan Sep 15, 2023
1b6deaf
types: extract kay value, interpolation to common.
narekhovhannisyan Sep 15, 2023
acccf8a
lib: restructure import and comments for sci.
narekhovhannisyan Sep 15, 2023
dd9b29f
lib: restructure teads, imports, and comments.
narekhovhannisyan Sep 15, 2023
afa7c93
lib: restructure shell imp, imports, and comments.
narekhovhannisyan Sep 15, 2023
dd2e0f1
tests: fix interpolation import.
narekhovhannisyan Sep 15, 2023
51c6d11
lib: restructure watt-time, imports, and comments.
narekhovhannisyan Sep 15, 2023
77d6763
Merge pull request #153 from Green-Software-Foundation/beautify-code
jmcook1186 Sep 15, 2023
fb89310
lint boavizta model
jmcook1186 Sep 15, 2023
1472d61
fix boavizta test
jmcook1186 Sep 15, 2023
3787cc1
lint boavizta test
jmcook1186 Sep 15, 2023
011d153
Test fixes for boavizta
gnanakeethan Sep 15, 2023
8ca7e5b
util: update imports from model universe.
narekhovhannisyan Sep 15, 2023
d56399e
util: add teads, eshoppen models to universe.
narekhovhannisyan Sep 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
build/
dist/
src/**/**.d.ts
src/**/**.js
287 changes: 123 additions & 164 deletions examples/impls/accenture.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,10 @@ description: sci calculation for accenture model (note need to add app gateway S
tags:
initialize:
models:
- name: add-obs # a model that just copies some values into every observation.
kind: builtin
path: ''
- name: teads-cpu
- name: sci-e # a model that sums e components
kind: builtin
verbose: false
path: ''
- name: e-mem # model that calculates e for ram memory usage
kind: builtin
verbose: false
path: ''
- name: pue
kind: builtin
verbose: false
path: ''
config:
pue: 1.125
- name: sci-m # a model that calculates m from te, tir, el, rr and rtor
kind: builtin
verbose: false
path: ''
path: ''
- name: sci-o # a model that given e, i and m calculates a carbon value (e * i) + m
kind: builtin
verbose: false
Expand All @@ -32,148 +15,124 @@ initialize:
kind: builtin
verbose: false
path: ''
graph:
vm:
pipeline:
- teads-cpu # converts cpu-util to energy based on a tdp and a built in set of coeff.
- e-mem # converts ram-util to energy based on a tdp and a built in set of coeff.
- pue # multiplies every energy by a pue coeff.
- sci-m # adds embodied to the observation.
- sci-o # calculates carbon for this obervation (energy * grid-ci) + embodied.
- sci # calculates sci by dividing carbon by `r`
- sci-accenture # multiplies sci value by 1.05 to account for the "app-gateway"
config:
sci-m:
te: 458 #kgCo2 @ 4yr lifespan
tir: "duration"
el: 126144000
rr: 1
tor: 1
teads-cpu:
tdp: ??? # what's the TDP for this server
add-obs:
grid-ci: 350.861 # Just copies any values under here to the observation as is.
sci:
time: hour # signal to convert /s -> /hr
factor: 89000 # factor to convert per time to per f.unit
children:
vm1:
observations:
- timestamp: 2023-07-06T00:00
duration: 2419200 # seconds in a month (7 days * 4 weeks)
cpu-util: 15
ram-util: 75
e: 4.26 #kwh/month
vm2:
observations:
- timestamp: 2023-07-06T00:00
duration: 2419200 # seconds in a month (7 days * 4 weeks)
cpu-util: 12
ram-util: 72
e: 4.26 # kwh/month
vm3:
observations:
- timestamp: 2023-07-06T00:00
duration: 2419200 # seconds in a month (7 days * 4 weeks)
cpu-util: 10
ram-util: 65
e: 4.21 # kwh/month
vm4:
observations:
- timestamp: 2023-07-06T00:00
duration: 2419200 # seconds in a month (7 days * 4 weeks)
cpu-util: 9
ram-util: 70
e: 4.21 # kwh/month
vm5:
observations:
- timestamp: 2023-07-06T00:00
duration: 2419200 # seconds in a month (7 days * 4 weeks)
cpu-util: 9
ram-util: 70
e: 4.21 # kwh/month
vm6:
observations:
- timestamp: 2023-07-06T00:00
duration: 2419200 # seconds in a month (7 days * 4 weeks)
cpu-util: 8
ram-util: 65
e: 3.29 # kwh/month
vm7:
observations:
- timestamp: 2023-07-06T00:00
duration: 2419200 # seconds in a month (7 days * 4 weeks)
cpu-util: 7
ram-util: 72
e: 3.29 # kwh/month
vm8:
observations:
- timestamp: 2023-07-06T00:00
duration: 2419200 # seconds in a month (7 days * 4 weeks)
cpu-util: 6
ram-util: 70
e: 3.29 # kwh/month
db:
pipeline:
- add-obs # add common values to every observertion
- teads-cpu # converts cpu-util to energy based on a tdp and a built in set of coeff.
- e-mem # converts ram-util to energy
- pue # multiplies every energy by a pue coeff.
- sci-m # adds embodied to the observeation.
- sci-o # calculates carbon for this obervation (energy * grid-ci) + embodied.
- sci # calculates sci by dividing carbon by `r`
config:
sci-m:
te: 458 #kgCo2 @ 4yr lifespan
tir: "duration"
el: 126144000
rr: 1
tor: 1
teads-cpu:
tdp: ??? # what's the TDP for this server
add-obs:
grid-ci: 350.861 # Just copies any values under here to the observation as is.
sci:
time: hour # signal to convert /s -> /hr
factor: 89000 # factor to convert per time to per f.unit
observations:
- timestamp: 2023-07-06T00:00
duration: 2419200 # seconds in a month (7 days * 4 weeks)
cpu-util: 4
ram-util: 40
e: 2.68 # kwh/month
monitoring:
pipeline:
- add-obs # add common values to every observertion
- teads-cpu # converts cpu-util to energy
- e-mem # conmverts ram-util to energy
- pue # multiplies every energy by a pue coeff.
- sci-m # adds embodied to the observeation.
- sci-o # calculates carbon for this obervation (energy * grid-ci) + embodied.
- sci # calculates sci by dividing carbon by `r`
config:
sci-m:
te: 458 #kgCo2 @ 4yr lifespan
tir: "duration"
el: 126144000
rr: 1
tor: 1
teads-cpu:
tdp: ??? # what's the TDP for this server
add-obs:
grid-ci: 350.861 # Just copies any values under here to the observation as is.
sci:
time: hour # signal to convert /s -> /hr
factor: 89000 # factor to convert per time to per f.unit
observations:
- timestamp: 2023-07-06T00:00
duration: 2419200 # seconds in a month (7 days * 4 weeks)
cpu-util: 20
ram-util: 0
e: 4.62 # kwh/month
app-gateway: # note that the app gateway does not have observations, its SCI is assumed equal to 5% of the total emissions
pipeline:
- sci-accenture
config:
sci_accenture:
factor: 1.05 # multiply sum of other sci components by this value to get overall total SCI in gCO2
- name: sci-accenture # a model that sums sci-o + sci-m
kind: builtin
verbose: false
path: ''
graph:
children:
vm:
pipeline:
- sci-e # sums e components
- sci-o # calculates carbon for this obervation (energy * grid-ci) + embodied.
- sci # calculates sci by dividing carbon by `r`
- sci-accenture # multiplies sci value by 1.05 to account for the "app-gateway"
config:
sci-o:
grid-ci: 350.861
sci:
time: '' # signal to convert /s -> /hr
factor: 89000 # factor to convert per time to per f.unit
# children:
# vm1:
observations:
- timestamp: 2023-07-06T00:00
duration: 2419200 # seconds in a month (7 days * 4 weeks)
cpu-util: 15
ram-util: 75
e-cpu: 4.26 #kwh/month
embodied-carbon: 763.33 #gCO2e
# vm2:
# observations:
# - timestamp: 2023-07-06T00:00
# duration: 2419200 # seconds in a month (7 days * 4 weeks)
# cpu-util: 12
# ram-util: 72
# e-cpu: 4.26 # kwh/month
# embodied-carbon: 763.33 #gCO2e
# vm3:
# observations:
# - timestamp: 2023-07-06T00:00
# duration: 2419200 # seconds in a month (7 days * 4 weeks)
# cpu-util: 10
# ram-util: 65
# e-cpu: 4.21 # kwh/month
# vm4:
# observations:
# - timestamp: 2023-07-06T00:00
# duration: 2419200 # seconds in a month (7 days * 4 weeks)
# cpu-util: 9
# ram-util: 70
# e-cpu: 4.21 # kwh/month
# embodied-carbon: 763.33 #gCO2e
# vm5:
# observations:
# - timestamp: 2023-07-06T00:00
# duration: 2419200 # seconds in a month (7 days * 4 weeks)
# cpu-util: 9
# ram-util: 70
# e-cpu: 4.21 # kwh/month
# embodied-carbon: 763.33 #gCO2e
# vm6:
# observations:
# - timestamp: 2023-07-06T00:00
# duration: 2419200 # seconds in a month (7 days * 4 weeks)
# cpu-util: 8
# ram-util: 65
# e-cpu: 3.29 # kwh/month
# embodied-carbon: 763.33 #gCO2e
# vm7:
# observations:
# - timestamp: 2023-07-06T00:00
# duration: 2419200 # seconds in a month (7 days * 4 weeks)
# cpu-util: 7
# ram-util: 72
# e-cpu: 3.29 # kwh/month
# embodied-carbon: 763.33 #gCO2e
# vm8:
# observations:
# - timestamp: 2023-07-06T00:00
# duration: 2419200 # seconds in a month (7 days * 4 weeks)
# cpu-util: 6
# ram-util: 70
# e-cpu: 3.29 # kwh/month
# embodied-carbon: 763.33 #gCO2e
db:
pipeline:
- sci-e # sums e components
- sci-o # calculates carbon for this obervation (energy * grid-ci) + embodied.
- sci # calculates sci by dividing carbon by `r`
- sci-accenture # multiplies sci value by 1.05 to account for the "app-gateway"
config:
sci-o:
grid-ci: 350.86
sci:
time: '' # signal to convert /s -> /hr
factor: 89000 # factor to convert per time to per f.unit
observations:
- timestamp: 2023-07-06T00:00
duration: 2419200 # seconds in a month (7 days * 4 weeks)
cpu-util: 4
ram-util: 40
e-cpu: 2.68 # kwh/month
embodied-carbon: 763.33 #gCO2e
monitoring:
pipeline:
- sci-e # sums e components
- sci-o # calculates carbon for this obervation (energy * grid-ci) + embodied.
- sci # calculates sci by dividing carbon by `r`
- sci-accenture # multiplies sci value by 1.05 to account for the "app-gateway"
config:
sci-o:
grid-ci: 350.861
sci:
time: '' # signal to convert /s -> /hr
factor: 89000 # factor to convert per time to per f.unit
observations:
- timestamp: 2023-07-06T00:00
duration: 2419200 # seconds in a month (7 days * 4 weeks)
cpu-util: 4
ram-util: 40
e-cpu: 4.62 # kwh/month
embodied-carbon: 763.33 #gCO2e

45 changes: 20 additions & 25 deletions examples/impls/aveva.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,39 @@ tags:
category: on-premise
initialize:
models:
- name: e-aveva # a model that takes in power observations and returns e.
kind: plugin
path: ''
verbose: false
- name: aveva # a model that takes in power observations and returns e.
kind: builtin
- name: sci-o # a model that given e, i and m calculates a carbon value (e * i) + m
kind: builtin
verbose: false
path: ''
- name: sci-e # a model that given e, i and m calculates a carbon value (e * i) + m
kind: builtin
- name: sci-m # a model that calculates m from te, tir, el, rr and rtor.
kind: builtin
verbose: false
path: ''
- name: sci # sums SCI components and converts to f.unit
kind: builtin
verbose: false
path: ''
graph:
children:
pc:
pipeline:
- aveva
- sci-e
- sci-m
- sci-o
config:
aveva:
sci-e:
sci-m:
config:
te: 350 # kgCO2eq
tir: 31536000 # 1 year in seconds
el: 157680000 # 5 years in seconds
rr: 1
tor: 1
te: 350000 # kgCO2eq
tir: 1 # 1 year in seconds
el: 5 # 5 years in seconds
rr: 1
tor: 1
sci-o:
config:
i: 474.8 #gCo2/kWh
sci:
config:
time: '' # don't do any time norm
factor: 1
observations:
timestamp: 2023-07-06T00:00
grid-ci: 474.8 #gCo2/kWh
observations:
- timestamp: 2023-07-06T00:00
pl: 16.009 # average over timespan
pb: 11.335 # average over timespan
t: 8322 # (hours in year * average uptime e.g. 95%)
time: 8322 # (hours in year * average uptime e.g. 95%)


Loading