Interface PowerModelHost
- All Superinterfaces:
PowerModel
- All Known Implementing Classes:
PowerModelHostAbstract,PowerModelHostSimple,PowerModelHostSpec
Provides a model for defining
Host power consumption.- Since:
- CloudSim Plus 6.0.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PowerModelHostAn attribute that implements the Null Object Design Pattern forPowerModelHostobjects. -
Method Summary
Modifier and TypeMethodDescriptionvoidAfter the Host is powered off, adds the consumed power to the total shutdown power.voidAfter the Host is powered on, adds the consumed power to the total startup power.getHost()The Host this PowerModel is collecting power consumption measurements from.doublegetPower(double utilizationFraction) Computes the hosts power usage in Watts (W) at a certain degree of utilization.doubleThe power consumed (in Watts) for shutting down theHost.doubleThe power consumed (in Watts) for starting up theHost.doubleThe total power consumed (in Watts) during all the times theHostwas powered off.doubleThe total time (in seconds) theHostspent during shut down.doubleThe total power consumed (in Watts) during all the times theHostwas powered on.intThe number of times the Host has started up.doubleThe total time (in seconds) theHostspent during startup.setShutDownPower(double power) Set the power consumed (in Watts) for shutting down theHost.setStartupPower(double power) Set the power consumed (in Watts) for starting up theHost.Methods inherited from interface org.cloudsimplus.power.models.PowerModel
getPower, getPowerMeasurement
-
Field Details
-
NULL
An attribute that implements the Null Object Design Pattern forPowerModelHostobjects.
-
-
Method Details
-
getPower
double getPower(double utilizationFraction) Computes the hosts power usage in Watts (W) at a certain degree of utilization. Mainly for backwards compatibility.- 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]
-
setStartupPower
Set the power consumed (in Watts) for starting up theHost. -
setShutDownPower
Set the power consumed (in Watts) for shutting down theHost. -
addStartupTotals
void addStartupTotals()After the Host is powered on, adds the consumed power to the total startup power. If the Host is powered on/off multiple times, that power consumed is summed up. -
addShutDownTotals
void addShutDownTotals()After the Host is powered off, adds the consumed power to the total shutdown power. If the Host is powered on/off multiple times, that power consumed is summed up. -
getHost
Host getHost()The Host this PowerModel is collecting power consumption measurements from. -
getStartupPower
double getStartupPower()The power consumed (in Watts) for starting up theHost. -
getShutDownPower
double getShutDownPower()The power consumed (in Watts) for shutting down theHost. -
getTotalStartupPower
double getTotalStartupPower()The total power consumed (in Watts) during all the times theHostwas powered on. If the Host has never started up, returns zero. -
getTotalShutDownPower
double getTotalShutDownPower()The total power consumed (in Watts) during all the times theHostwas powered off. If the Host has never started up then shutdown, returns zero. -
getTotalStartupTime
double getTotalStartupTime()The total time (in seconds) theHostspent during startup. If the Host starts up multiple times, the time spent is summed up.- See Also:
-
getTotalShutDownTime
double getTotalShutDownTime()The total time (in seconds) theHostspent during shut down. If the Host shuts down multiple times, the time spent is summed up.- See Also:
-
getTotalStartups
int getTotalStartups()The number of times the Host has started up.- See Also:
-
setHost
-