Class DatacenterBrokerFirstFit

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

public class DatacenterBrokerFirstFit extends DatacenterBrokerSimple
A implementation of DatacenterBroker that uses a First Fit mapping between submitted cloudlets and Vm's, trying to place a Cloudlet at the first 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.6.0
Author:
Manoel Campos da Silva Filho
  • Constructor Details

    • DatacenterBrokerFirstFit

      public DatacenterBrokerFirstFit(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 first 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: