Class DatacenterPowerSupply
java.lang.Object
org.cloudbus.cloudsim.datacenters.DatacenterPowerSupply
- All Implemented Interfaces:
PowerAware
public class DatacenterPowerSupply extends java.lang.Object implements PowerAware
Computes current amount of power being consumed by the
Host
s of a Datacenter
.- Since:
- CloudSim Plus 4.2.0
- Author:
- Manoel Campos da Silva Filho
-
Field Summary
Fields Modifier and Type Field Description static DatacenterPowerSupply
NULL
-
Constructor Summary
Constructors Modifier Constructor Description DatacenterPowerSupply()
protected
DatacenterPowerSupply(Datacenter datacenter)
-
Method Summary
Modifier and Type Method Description protected double
computePowerUtilizationForTimeSpan(double lastDatacenterProcessTime)
Computes an estimation of total power consumed (in Watts-sec) by all Hosts of the Datacenter since the last time the processing of Cloudlets in this Host was updated.double
getPower()
Gets the total power consumed by the Datacenter up to now in Watt-Second (Ws).protected DatacenterPowerSupply
setDatacenter(Datacenter datacenter)
-
Field Details
-
Constructor Details
-
DatacenterPowerSupply
public DatacenterPowerSupply() -
DatacenterPowerSupply
-
-
Method Details
-
computePowerUtilizationForTimeSpan
protected double computePowerUtilizationForTimeSpan(double lastDatacenterProcessTime)Computes an estimation of total power consumed (in Watts-sec) by all Hosts of the Datacenter since the last time the processing of Cloudlets in this Host was updated. It also updates theDatacenter's total consumed power up to now
.- Returns:
- the estimated total power consumed (in Watts-sec) by all Hosts in the elapsed time span
-
getPower
public double getPower()Gets the total power consumed by the Datacenter up to now in Watt-Second (Ws).- Specified by:
getPower
in interfacePowerAware
- Returns:
- the total power consumption in Watt-Second (Ws)
- See Also:
PowerAware.getPowerInKWatts()
-
setDatacenter
-