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.
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;
}