Class PowerVmSelectionPolicyMaximumCorrelation
- java.lang.Object
-
- org.cloudbus.cloudsim.selectionpolicies.power.PowerVmSelectionPolicy
-
- org.cloudbus.cloudsim.selectionpolicies.power.PowerVmSelectionPolicyMaximumCorrelation
-
public class PowerVmSelectionPolicyMaximumCorrelation extends PowerVmSelectionPolicy
A VM selection policy that selects for migration the VM with the Maximum Correlation Coefficient (MCC) among a list of migratable 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 Summary
Constructors Constructor Description PowerVmSelectionPolicyMaximumCorrelation(PowerVmSelectionPolicy fallbackPolicy)
Instantiates a new PowerVmSelectionPolicyMaximumCorrelation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<Double>
getCorrelationCoefficients(double[][] data)
Gets the correlation coefficients.PowerVmSelectionPolicy
getFallbackPolicy()
Gets the fallback policy.protected int
getMinUtilizationHistorySize(List<Vm> vmList)
Gets the min CPU utilization percentage history size between a list of VMs.protected double[][]
getUtilizationMatrix(List<Vm> vmList)
Gets the CPU utilization percentage matrix for a given list of VMs.Vm
getVmToMigrate(Host host)
Gets a VM to migrate from a given host.void
setFallbackPolicy(PowerVmSelectionPolicy fallbackPolicy)
Sets the fallback policy.
-
-
-
Constructor Detail
-
PowerVmSelectionPolicyMaximumCorrelation
public PowerVmSelectionPolicyMaximumCorrelation(PowerVmSelectionPolicy fallbackPolicy)
Instantiates a new PowerVmSelectionPolicyMaximumCorrelation.- Parameters:
fallbackPolicy
- the fallback policy
-
-
Method Detail
-
getVmToMigrate
public Vm getVmToMigrate(Host host)
Description copied from class:PowerVmSelectionPolicy
Gets a VM to migrate from a given host.- Specified by:
getVmToMigrate
in classPowerVmSelectionPolicy
- 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
-
getUtilizationMatrix
protected double[][] getUtilizationMatrix(List<Vm> vmList)
Gets the CPU utilization percentage matrix for a given list of VMs.- Parameters:
vmList
- the VM list- Returns:
- the CPU utilization percentage matrix, where each line i is a VM and each column j is a CPU utilization percentage history for that VM.
-
getMinUtilizationHistorySize
protected int getMinUtilizationHistorySize(List<Vm> vmList)
Gets the min CPU utilization percentage history size between a list of VMs.- Parameters:
vmList
- the VM list- Returns:
- the min CPU utilization percentage history size of the VM list
-
getCorrelationCoefficients
protected List<Double> getCorrelationCoefficients(double[][] data)
Gets the correlation coefficients.- Parameters:
data
- the data- Returns:
- the correlation coefficients
-
getFallbackPolicy
public PowerVmSelectionPolicy getFallbackPolicy()
Gets the fallback policy.- Returns:
- the fallback policy
-
setFallbackPolicy
public final void setFallbackPolicy(PowerVmSelectionPolicy fallbackPolicy)
Sets the fallback policy.- Parameters:
fallbackPolicy
- the new fallback policy
-
-