PowerHost (cloudsim 3.1-SNAPSHOT API)

org.cloudbus.cloudsim.power

## Class PowerHost

- java.lang.Object
- - org.cloudbus.cloudsim.Host
  - - org.cloudbus.cloudsim.HostDynamicWorkload
    - - org.cloudbus.cloudsim.power.PowerHost

- Direct Known Subclasses:
    PowerHostUtilizationHistory

      public class PowerHost
      extends HostDynamicWorkload

  PowerHost class enables simulation of power-aware hosts. If you are using any algorithms, policies or workload included in the power package please cite the following paper: Anton Beloglazov, and Rajkumar Buyya, "Optimal Online Deterministic Algorithms and Adaptive Heuristics for Energy and Performance Efficient Dynamic Consolidation of Virtual Machines in Cloud Data Centers", Concurrency and Computation: Practice and Experience, ISSN: 1532-0626, Wiley Press, New York, USA, 2011, DOI: 10.1002/cpe.1867
  Since:
    CloudSim Toolkit 2.0
  Author:
    Anton Beloglazov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PowerHost(int id, RamProvisioner ramProvisioner, BwProvisioner bwProvisioner, long storage, List<? extends Pe> peList, VmScheduler vmScheduler, PowerModel powerModel)` Instantiates a new host.
    `PowerHost(int id, RamProvisioner ramProvisioner, BwProvisioner bwProvisioner, long storage, List<? extends Pe> peList, VmScheduler vmScheduler, PowerModel powerModel, boolean enableOnOff, boolean enableDvfs)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getEnergyLinearInterpolation(double fromUtilization, double toUtilization, double time)` Gets the energy consumption using linear interpolation of the utilization change.
    `double` | `getMaxPower()` Gets the max power that can be consumed by the host.
    `double` | `getPMax(int frequency)` return the Max Power consume by the host regarding its current frequency We do a 'if' on the enableDVFS value because we have to be sure that we use the PowerModelSpecDVFS powermodel Methods getPMax and getPMin didn't have been add to the Interface PowerModel because in this case it would impact all other models, even those that not use multiple power value in relation with the CPU frequency
    `double` | `getPMin(int frequency)` return the Min Power consume by the host regarding its current frequency same comment as the getPMax() method.
    `double` | `getPower()` Gets the power.
    `protected double` | `getPower(double utilization)` Gets the power.
    `PowerModel` | `getPowerModel()` Gets the power model.

    - ### Methods inherited from class org.cloudbus.cloudsim.HostDynamicWorkload

      `addStateHistoryEntry, getCompletedVms, getMaxUtilization, getMaxUtilizationAmongVmsPes, getPreviousUtilizationMips, getPreviousUtilizationOfCpu, getStateHistory, getUtilizationMips, getUtilizationOfBw, getUtilizationOfCpu, getUtilizationOfCpuMips, getUtilizationOfRam, isDvfsActivatedOnHost, setPreviousUtilizationMips, setUtilizationMips, updateVmsProcessing`

    - ### Methods inherited from class org.cloudbus.cloudsim.Host

      `addMigratingInVm, allocatePesForVm, deallocatePesForVm, decreaseVmMips, decreaseVMMipsToHostNewVm, getAllocatedMipsForVm, getAvailableMips, getBw, getBwProvisioner, getDatacenter, getId, getMaxAvailableMips, getNumberOfFreePes, getNumberOfPes, getPeList, getRam, getRamProvisioner, getStorage, getTotalAllocatedMipsForVm, getTotalMaxMips, getTotalMips, getVm, getVmList, getVmScheduler, getVmsMigratingIn, isEnableDVFS, isEnableONOFF, isFailed, isSuitableForVm, MakeSuitableHostForVm, reallocateMigratingInVms, regrowVmMips, regrowVmMipsAfterVmEnd, removeMigratingInVm, setAvailableMips, setBwProvisioner, setDatacenter, setEnableDVFS, setEnableONOFF, setFailed, setFailed, setId, setPeList, setPeStatus, setRamProvisioner, setStorage, setVmScheduler, vmCreate, vmDeallocate, vmDeallocateAll, vmDestroy, vmDestroyAll`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PowerHost

          public PowerHost(int id,
                   RamProvisioner ramProvisioner,
                   BwProvisioner bwProvisioner,
                   long storage,
                   List<? extends Pe> peList,
                   VmScheduler vmScheduler,
                   PowerModel powerModel)

      Instantiates a new host.
      Parameters:
        `id` - the id
        `ramProvisioner` - the ram provisioner
        `bwProvisioner` - the bw provisioner
        `storage` - the storage
        `peList` - the pe list
        `vmScheduler` - the VM scheduler

    - #### PowerHost

          public PowerHost(int id,
                   RamProvisioner ramProvisioner,
                   BwProvisioner bwProvisioner,
                   long storage,
                   List<? extends Pe> peList,
                   VmScheduler vmScheduler,
                   PowerModel powerModel,
                   boolean enableOnOff,
                   boolean enableDvfs)

  - ### Method Detail

    - #### getPower

          public double getPower()

      Gets the power. For this moment only consumed by all PEs.
      Returns:
        the power

    - #### getPower

          protected double getPower(double utilization)

      Gets the power. For this moment only consumed by all PEs.
      Parameters:
        `utilization` - the utilization
      Returns:
        the power

    - #### getMaxPower

          public double getMaxPower()

      Gets the max power that can be consumed by the host.
      Returns:
        the max power

    - #### getEnergyLinearInterpolation

          public double getEnergyLinearInterpolation(double fromUtilization,
                                            double toUtilization,
                                            double time)

      Gets the energy consumption using linear interpolation of the utilization change.
      Parameters:
        `fromUtilization` - the from utilization
        `toUtilization` - the to utilization
        `time` - the time
      Returns:
        the energy

    - #### getPowerModel

          public PowerModel getPowerModel()

      Gets the power model.
      Returns:
        the power model

    - #### getPMax

          public double getPMax(int frequency)

      return the Max Power consume by the host regarding its current frequency We do a 'if' on the enableDVFS value because we have to be sure that we use the PowerModelSpecDVFS powermodel Methods getPMax and getPMin didn't have been add to the Interface PowerModel because in this case it would impact all other models, even those that not use multiple power value in relation with the CPU frequency
      Parameters:
        `frequency` -
      Returns:

    - #### getPMin

          public double getPMin(int frequency)

      return the Min Power consume by the host regarding its current frequency same comment as the getPMax() method.
      Parameters:
        `frequency` -
      Returns:

Copyright © 2013 The Cloud Computing and Distributed Systems (CLOUDS) Laboratory, The University of Melbourne. All Rights Reserved.