Class PowerModelHostSpec
java.lang.Object
org.cloudbus.cloudsim.power.models.PowerModelHost
org.cloudbus.cloudsim.power.models.PowerModelHostSpec
- All Implemented Interfaces:
PowerModel
public class PowerModelHostSpec extends PowerModelHost
A power model created based on data from
SPEC power benchmark.
If you are using any algorithms, policies or workload included in the power package please cite the following paper:
- Since:
- CloudSim Plus 6.0.0
- Author:
- Anton Beloglazov
-
Field Summary
Fields inherited from class org.cloudbus.cloudsim.power.models.PowerModelHost
NULL
-
Constructor Summary
Constructors Constructor Description PowerModelHostSpec(List<Double> powerSpec)
Instantiates a PowerModelHostSpec providing the power consumption data of the entity for different CPU utilization percentages. -
Method Summary
Modifier and Type Method Description double
getPower(double utilizationFraction)
Computes the hosts power usage in Watts (W) at a certain degree of utilization.PowerMeasurement
getPowerMeasurement()
Returns the entity's current power usage as aPowerMeasurement
, which can hold additional information like static and dynamic fraction of power usage.Methods inherited from class org.cloudbus.cloudsim.power.models.PowerModelHost
getHost, setHost
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.cloudbus.cloudsim.power.models.PowerModel
getPower
-
Constructor Details
-
PowerModelHostSpec
Instantiates a PowerModelHostSpec providing the power consumption data of the entity for different CPU utilization percentages.- Parameters:
powerSpec
- a list where each element represents the power consumption of the entity for specific CPU utilization percentage. The index of the list represents the CPU utilization percentage and the value, the power consumption for that percentage.If there are 100 elements in this list, element at position 1 represents the power consumption for 1% of CPU utilization, where element 100,
represents power consumption for 100% of CPU utilization.If there are only 10 elements in this list, each element represents the power consumption when the CPU utilization is between an interval between [p .. p+10], where p is the CPU utilization percentage. For instance, element 0 represents the power consumption when CPU utilization is between [0 .. 10%].
-
-
Method Details
-
getPowerMeasurement
Description copied from interface:PowerModel
Returns the entity's current power usage as aPowerMeasurement
, which can hold additional information like static and dynamic fraction of power usage. -
getPower
Description copied from class:PowerModelHost
Computes the hosts power usage in Watts (W) at a certain degree of utilization. Mainly for backwards compatibility.- Specified by:
getPower
in classPowerModelHost
- Parameters:
utilizationFraction
- the utilization percentage (between [0 and 1]) of the host.- Returns:
- the power supply in Watts (W)
- Throws:
IllegalArgumentException
- if utilizationFraction is not between [0 and 1]
-