summaryrefslogtreecommitdiff
path: root/opendc-compute/opendc-compute-simulator/src/main
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-06-14 13:57:25 +0200
committerGitHub <noreply@github.com>2021-06-14 13:57:25 +0200
commite24e7c1601257cf27d71db8ca3ae273b24ab06ed (patch)
tree913777f9e7c0008abaaf18445932583e4b01c972 /opendc-compute/opendc-compute-simulator/src/main
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-compute/opendc-compute-simulator/src/main')
-rw-r--r--opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt
index d36717af..540e27fe 100644
--- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt
+++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt
@@ -129,7 +129,7 @@ public class SimHost(
_batch.put(_cpuWorkInterference, interferedWork.toDouble())
_batch.put(_cpuUsage, cpuUsage)
_batch.put(_cpuDemand, cpuDemand)
- _batch.put(_cpuPower, machine.powerDraw)
+ _batch.put(_cpuPower, machine.psu.powerDraw)
_batch.record()
}
}