Class DatacenterBrokerBestFit

All Implemented Interfaces:
Cloneable, Comparable<SimEntity>, Runnable, DatacenterBroker, Identifiable, Nameable, SimEntity

public class DatacenterBrokerBestFit extends DatacenterBrokerSimple
A implementation of DatacenterBroker that uses a Best Fit mapping between submitted cloudlets and Vm's, trying to place a Cloudlet at the best suitable Vm which can be found (according to the required Cloudlet's PEs). The Broker then places the submitted Vm's at the first Datacenter found. If there isn't capacity in that one, it will try the other ones.
Since:
CloudSim Plus 4.3.8
Author:
Manoel Campos da Silva Filho
  • Constructor Details

    • DatacenterBrokerBestFit

      public DatacenterBrokerBestFit(CloudSim simulation)
      Creates a DatacenterBroker object.
      Parameters:
      simulation - The CloudSim instance that represents the simulation the Entity is related to
  • Method Details

    • defaultVmMapper

      public Vm defaultVmMapper(Cloudlet cloudlet)
      Selects the VM with the lowest number of PEs that is able to run a given Cloudlet. In case the algorithm can't find such a VM, it uses the default DatacenterBroker VM mapper as a fallback.
      Overrides:
      defaultVmMapper in class DatacenterBrokerSimple
      Parameters:
      cloudlet - the Cloudlet to find a VM to run it
      Returns:
      the VM selected for the Cloudlet or Vm.NULL if no suitable VM was found
      See Also: