Class VmSelectionPolicyRandomSelection

java.lang.Object
org.cloudbus.cloudsim.selectionpolicies.VmSelectionPolicyRandomSelection
All Implemented Interfaces:
VmSelectionPolicy

public class VmSelectionPolicyRandomSelection
extends Object
implements VmSelectionPolicy
A VM selection policy that randomly select VMs to migrate from a host. It uses a uniform Pseudo Random Number Generator (PRNG) as default to select VMs.
If you are using any algorithms, policies or workload included in the power package please cite the following paper:
Since:
CloudSim Toolkit 3.0
Author:
Anton Beloglazov
  • Constructor Details

    • VmSelectionPolicyRandomSelection

      public VmSelectionPolicyRandomSelection()
      Creates a PowerVmSelectionPolicyRandomSelection using a uniform Pseudo Random Number Generator (PRNG) as default to select VMs to migrate.
    • VmSelectionPolicyRandomSelection

      public VmSelectionPolicyRandomSelection​(ContinuousDistribution rand)
      Creates a PowerVmSelectionPolicyRandomSelection using a given Pseudo Random Number Generator (PRNG) to select VMs to migrate.
      Parameters:
      rand - a Pseudo Random Number Generator (PRNG) to randomly select VMs to migrate.
  • Method Details

    • getVmToMigrate

      public Vm getVmToMigrate​(Host host)
      Description copied from interface: VmSelectionPolicy
      Gets a VM to migrate from a given host.
      Specified by:
      getVmToMigrate in interface VmSelectionPolicy
      Parameters:
      host - the host to get a Vm to migrate from
      Returns:
      the vm to migrate or Vm.NULL if there is not Vm to migrate