A power model where the power consumption is defined by a
UnaryOperatorfunction given as parameter to the constructor. This way, the user can define how the power consumption increases along the time without requiring to create a new class for it.
Author: Manoel Campos da Silva Filho
PowerModelSimple(double maxPower, double staticPowerPercent, UnaryOperator<Double> powerFunction)¶
Instantiates a PowerModelSimple.
- maxPower – the max power that can be consumed in Watt-Second (Ws).
- staticPowerPercent – the static power usage percentage between [0 and 1].
- powerFunction – A function defining how the power consumption is computed based on the CPU utilization. When called, this function receives the utilization percentage in scale from [0 to 100] and must return the base power consumption for that CPU utilization. The function is only accountable to compute the base energy consumption because the total energy consumption depends on other factors such as the
static powerconsumed by the Host, independent of its CPU usage.
Gets the constant which represents the power consumption for each fraction of resource used in Watt-Second (Ws).
Returns: the power consumption constant in Watt-Second (Ws)