Amazing technological breakthrough possible @S-Logix pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

Where do i implement new VmAllocationPolicy in EdgeCloudSim?

Description

In EdgeCloudSim, you have to implement three separate Vm Allocation policies for cloud, edge and mobile servers separately. Same as VmAllocationPolicySimple in cloudSim, you have to extend VMAllocationPolicy.java file.

Sample Code

package edu.boun.edgecloudsim.edge_server;

import ……;
import ……;

public class CustomEdgeVmAllocationPolicy extends VmAllocationPolicy
{
public CustomEdgeVmAllocationPolicy (List list, int DataCenterIndex)
{
super(list);
setVmTable(new HashMap<String, Host>());
DataCenterIndex=_DataCenterIndex;
createdVmNum = 0;
}

@Override
public boolean allocateHostForVm(Vm vm)
{
boolean result = false;

if (!getVmTable().containsKey(vm.getUid()) && vm instanceof EdgeVM)
{
.
. Implementation of new concepts for vm allocation policy
.
}
}
.
.
return result;
}