diff options
| author | Dante Niewenhuis <d.niewenhuis@hotmail.com> | 2025-01-10 15:10:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-10 15:10:31 +0100 |
| commit | 39aeb8e07d640fee5e3ba1b4d64eb3a3a964648b (patch) | |
| tree | a06a54109519edf3b63c4618cd8187f6d63a1de1 /opendc-simulator | |
| parent | 192ca10f332c58d38d129709c64dd69c284683f5 (diff) | |
Fixed a small bug in the Power Source (#289)
* Fixed a small bug which caused the PowerSource to not always report the correct energy usage
* spotless
Diffstat (limited to 'opendc-simulator')
| -rw-r--r-- | opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/power/SimPowerSource.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/power/SimPowerSource.java b/opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/power/SimPowerSource.java index d2270888..f68c008e 100644 --- a/opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/power/SimPowerSource.java +++ b/opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/power/SimPowerSource.java @@ -168,6 +168,8 @@ public final class SimPowerSource extends FlowNode implements FlowSupplier { @Override public void pushOutgoingSupply(FlowEdge consumerEdge, double newSupply) { + updateCounters(); + this.powerSupplied = newSupply; consumerEdge.pushSupply(newSupply); } |
