Class VmCost

java.lang.Object
org.cloudbus.cloudsim.vms.VmCost

public class VmCost extends Object
Computes the monetary ($) cost to run a given VM, including the total cost and individual resource cost, namely: the processing power, bandwidth, memory and storage cost.
Since:
CloudSim Plus 1.0
Author:
raysaoliveira
  • Constructor Summary

    Constructors
    Constructor
    Description
    VmCost(Vm vm)
    Creates an instance to compute the monetary cost ($) to run a given VM.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Gets the total monetary cost ($) of the VM's allocated BW.
    double
    Gets the total monetary cost ($) of the VM's allocated memory.
    double
    Gets the total monetary cost ($) of processing power allocated from the PM hosting the VM, considering the VM's PEs number and total execution time.
    double
    Gets the total monetary cost ($) of the VM's allocated storage.
    double
    Gets the total monetary cost ($) of all resources allocated to the VM, namely the processing power, bandwidth, memory and storage.
    Gets the VM for which the total monetary cost will be computed.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • VmCost

      public VmCost(Vm vm)
      Creates an instance to compute the monetary cost ($) to run a given VM.
      Parameters:
      vm - the VM to compute its monetary cost
  • Method Details

    • getVm

      public Vm getVm()
      Gets the VM for which the total monetary cost will be computed.
      Returns:
    • getMemoryCost

      public double getMemoryCost()
      Gets the total monetary cost ($) of the VM's allocated memory.
      Returns:
    • getBwCost

      public double getBwCost()
      Gets the total monetary cost ($) of the VM's allocated BW.
      Returns:
    • getProcessingCost

      public double getProcessingCost()
      Gets the total monetary cost ($) of processing power allocated from the PM hosting the VM, considering the VM's PEs number and total execution time.
      Returns:
    • getStorageCost

      public double getStorageCost()
      Gets the total monetary cost ($) of the VM's allocated storage.
      Returns:
      getStorageCost
    • getTotalCost

      public double getTotalCost()
      Gets the total monetary cost ($) of all resources allocated to the VM, namely the processing power, bandwidth, memory and storage.
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object