summaryrefslogtreecommitdiff
path: root/opendc-simulator/opendc-simulator-power/src/main
AgeCommit message (Collapse)Author
2024-10-25Rewrote the FlowEngine (#256)Dante Niewenhuis
* Removed unused components. Updated tests. Improved checkpointing model Improved model, started with SimPowerSource implemented FailureModels and Checkpointing First working version midway commit first update All simulation are now run with a single CPU and single MemoryUnit. multi CPUs are combined into one. This is for performance and explainability. * fixed merge conflicts * Updated M3SA paths. * Fixed small typo
2022-10-21refactor(sim/power): Re-implement power sim using flow2Fabian Mastenbroek
This change updates the `opendc-simulator-power` module to use the new flow simulation framework in OpenDC (named flow2 for now).
2022-10-06build: Switch to Spotless for formattingFabian Mastenbroek
This change updates the build configuration to use Spotless for code formating of both Kotlin and Java.
2022-10-06style: Eliminate use of wildcard importsFabian Mastenbroek
This change updates the repository to remove the use of wildcard imports everywhere. Wildcard imports are not allowed by default by Ktlint as well as Google's Java style guide.
2021-10-03feat(simulator): Expose CPU time counters directly on hypervisorFabian Mastenbroek
This change adds a new interface to the SimHypervisor interface that exposes the CPU time counters directly. These are derived from the flow counters and will be used by SimHost to expose them via telemetry.
2021-10-03fix(simulator): Fix loss computation for UPS and PDUFabian Mastenbroek
This change fixes the loss computation for both the UPS and PDU implementation that was broken due to the new pushing mechanism. We implement a new class FlowMapper that can be used to map the flow pushed by a `FlowSource` using a user-specified method.
2021-10-03refactor(simulator): Migrate to flow-based simulationFabian Mastenbroek
This change renames the `opendc-simulator-resources` module into the `opendc-simulator-flow` module to indicate that the core simulation model of OpenDC is based around modelling and simulating flows. Previously, the distinction between resource consumer and provider, and input and output caused some confusion. By switching to a flow-based model, this distinction is now clear (as in, the water flows from source to consumer/sink).
2021-10-03refactor(simulator): Remove transform from SimResourceForwarderFabian Mastenbroek
This change removes the ability to transform the duration of a pull from the SimResourceForwarder class. This ability is not used anymore, since pushes are now done using a method instead of a command.
2021-10-03refactor(simulator): Merge distributor and aggregator into switchFabian Mastenbroek
This change removes the distributor and aggregator interfaces in favour of a single switch interface. Since the switch interface is as powerful as both the distributor and aggregator, we don't need the latter two.
2021-10-03refactor(simulator): Eliminate usage of distributor and aggregatorFabian Mastenbroek
This change removes the use of distributor and aggregator from the other OpenDC components. For the future, we focus on maintaining a single SimResourceSwitch implementation to achieve both use-cases.
2021-10-03refactor(simulator): Add support for pushing flow from contextFabian Mastenbroek
This change adds a new method to `SimResourceContext` called `push` which allows users to change the requested flow rate directly without having to interrupt the consumer.
2021-10-03refactor(simulator): Combine work and deadline to durationFabian Mastenbroek
This change removes the work and deadline properties from the SimResourceCommand.Consume class and introduces a new property duration. This property is now used in conjunction with the limit to compute the amount of work processed by a resource provider. Previously, we used both work and deadline to compute the duration and the amount of remaining work at the end of a consumption. However, with this change, we ensure that a resource consumption always runs at the same speed once establishing, drastically simplifying the computation for the amount of work processed during the consumption.
2021-06-21simulator: Remove concept of resource lifecycleFabian Mastenbroek
This change removes the AutoCloseable interface from the SimResourceProvider and removes the concept of a resource lifecycle. Instead, resource providers are now either active (running a resource consumer) or in-active (being idle), which simplifies implementation.
2021-06-11simulator: Add model for UPSHongyu He
This change adds a new model for the UPS to the OpenDC simulator power subsystem.
2021-06-11simulator: Add power loss to SimPduHongyu He
This change adds a model for power loss to the Power Distribution Unit (PDU) model in OpenDC.
2021-06-10simulator: Add module for datacenter power componentsFabian Mastenbroek
This change adds a new module for simulating power components in datacenters such as PDUs and UPSes. This module will serve as the basis for the power monitoring framework in OpenDC and will future integrate with the other simulation components (such as compute).