summaryrefslogtreecommitdiff
path: root/opendc-experiments
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-06-14 13:57:25 +0200
committerHongyu <hongyuhe.cs@googlemail.com>2021-06-14 17:04:42 +0200
commitf255858563a02be0f68857bd6a32f8e09d58a0b0 (patch)
tree387f76bacd90c3e51980f42dff3e996d47cf63c1 /opendc-experiments
parente11cc719201b1e09a30fc88a30524219a17a1af0 (diff)
parentb5826e9dcf4a6b510d26168ba02b1781b3b6c521 (diff)
simulator: Add energy modelling subsystem to OpenDC
This pull request adds a subsystem to OpenDC for modelling power components in datacenters, such as UPSes, PDUs and PSUs. These components also take into account electrical losses that occur in real-world scenarios. - Add module for datacenter power components (UPS, PDU) - Integrate power subsystem with compute subsystem (PSU) - Model power loss in power components **Breaking API Changes** 1. `SimBareMetalMachine.powerDraw` is replaced by `SimBareMetalMachine.psu.powerDraw`
Diffstat (limited to 'opendc-experiments')
-rw-r--r--opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/core/SimTFDevice.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/core/SimTFDevice.kt b/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/core/SimTFDevice.kt
index 001547ef..92e7080a 100644
--- a/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/core/SimTFDevice.kt
+++ b/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/core/SimTFDevice.kt
@@ -153,7 +153,7 @@ public class SimTFDevice(
}
SimResourceEvent.Run -> {
_usage.record(ctx.speed)
- _power.record(machine.powerDraw)
+ _power.record(machine.psu.powerDraw)
}
else -> {}
}