Interface PowerModel
-
- All Superinterfaces:
PowerAware
- All Known Implementing Classes:
PowerModelAbstract
,PowerModelCubic
,PowerModelLinear
,PowerModelSimple
,PowerModelSpecPower
,PowerModelSpecPowerHpProLiantMl110G3PentiumD930
,PowerModelSpecPowerHpProLiantMl110G4Xeon3040
,PowerModelSpecPowerHpProLiantMl110G5Xeon3075
,PowerModelSpecPowerIbmX3250XeonX3470
,PowerModelSpecPowerIbmX3250XeonX3480
,PowerModelSpecPowerIbmX3550XeonX5670
,PowerModelSpecPowerIbmX3550XeonX5675
,PowerModelSqrt
,PowerModelSquare
public interface PowerModel extends PowerAware
Provides a model for power consumption of hosts, depending on utilization of a critical system component, such as CPU. This is the fundamental class to enable power-aware Hosts. However, a Host just provides power usage data if a PowerModel is set using theHost.setPowerModel(PowerModel)
. The power consumption data is return in Watt-Second (Ws), which is just in a different scale than the usual Kilowatt-Hour (kWh).The interface implements the Null Object Design Pattern in order to start avoiding
NullPointerException
when using theNULL
object instead of attributingnull
toPowerModel
variables.If you are using any algorithms, policies or workload included in the power package please cite the following paper:
- Since:
- CloudSim Toolkit 2.0
- Author:
- Anton Beloglazov, Manoel Campos da Silva Filho
-
-
Field Summary
Fields Modifier and Type Field Description static PowerModel
NULL
A property that implements the Null Object Design Pattern forHost
objects.
-
Method Summary
Modifier and Type Method Description double
getEnergyLinearInterpolation(double fromUtilization, double toUtilization, double time)
Gets an estimation of energy consumption using linear interpolation of the utilization change.Host
getHost()
double
getMaxPower()
Gets the max power that can be consumed by the host in Watt-Second (Ws).double
getPower(double utilization)
Gets power consumption in Watt-Second (Ws) of the Power Model, according to the utilization percentage of a critical resource, such as CPU.void
setHost(Host host)
-
Methods inherited from interface org.cloudbus.cloudsim.power.models.PowerAware
getPower, getPowerInKWattsHour
-
-
-
-
Field Detail
-
NULL
static final PowerModel NULL
A property that implements the Null Object Design Pattern forHost
objects.
-
-
Method Detail
-
getHost
Host getHost()
-
setHost
void setHost(Host host)
-
getMaxPower
double getMaxPower()
Gets the max power that can be consumed by the host in Watt-Second (Ws).- Returns:
- the max consumption power in Watt-Second (Ws)
-
getPower
double getPower(double utilization) throws java.lang.IllegalArgumentException
Gets power consumption in Watt-Second (Ws) of the Power Model, according to the utilization percentage of a critical resource, such as CPU.The power consumption data is just available while the host is active.
- Parameters:
utilization
- the utilization percentage (between [0 and 1]) of a resource that is critical for power consumption.- Returns:
- the power consumption in Watt-Second (Ws)
- Throws:
java.lang.IllegalArgumentException
- when the utilization percentage is not between [0 and 1]
-
getEnergyLinearInterpolation
double getEnergyLinearInterpolation(double fromUtilization, double toUtilization, double time)
Gets an estimation of energy consumption using linear interpolation of the utilization change. It's required to set aPowerModel
in order to get power usage data.- Parameters:
fromUtilization
- the initial utilization percentagetoUtilization
- the final utilization percentagetime
- the time span between the initial and final utilization to compute the energy consumption- Returns:
- the estimated energy consumption
-
-