DatacenterBrokerHeuristic

public class DatacenterBrokerHeuristic extends DatacenterBrokerSimple

A simple implementation of DatacenterBroker that uses some heuristic to get a suboptimal mapping among submitted cloudlets and Vm’s. Such heuristic can be, for instance, the org.cloudsimplus.heuristics.CloudletToVmMappingSimulatedAnnealing that implements a Simulated Annealing algorithm. 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.

Author:Manoel Campos da Silva Filho

Constructors

DatacenterBrokerHeuristic

public DatacenterBrokerHeuristic(CloudSim simulation)

Creates a new DatacenterBroker object.

Parameters:
  • simulation – The CloudSim instance that represents the simulation the Entity is related to

See also: .setHeuristic(CloudletToVmMappingHeuristic)

Methods

defaultVmMapper

public Vm defaultVmMapper(Cloudlet cloudlet)

getHeuristic

public Heuristic<CloudletToVmMappingSolution> getHeuristic()
Returns:the heuristic used to find a sub-optimal mapping between Cloudlets and Vm’s

requestDatacentersToCreateWaitingCloudlets

protected void requestDatacentersToCreateWaitingCloudlets()

setHeuristic

public DatacenterBrokerHeuristic setHeuristic(CloudletToVmMappingHeuristic heuristic)

Sets a heuristic to be used to find a sub-optimal mapping between Cloudlets and Vm’s. The list of Cloudlets and Vm’s to be used by the heuristic will be set automatically by the DatacenterBroker. Accordingly, the developer don’t have to set these lists manually, once they will be overridden.

The time taken to find a suboptimal mapping of Cloudlets to Vm’s depends on the heuristic parameters that have to be set carefully.

Parameters:
  • heuristic – the heuristic to be set
Returns:

the DatacenterBrokerHeuristic instance