protected void processCloudletSubmit(SimEvent ev, boolean ack) {
……;
……;
Cloudlet cl = (Cloudlet) ev.getData();
……;
……;
cl.setResourceParameter(getId(),getCharacteristics().getCostPerSecond(), getCharacteristics().getCostPerBw());
int userId = cl.getUserId();
int vmId = cl.getVmId();
if(cl.getCloudletId()==3){ // the cloudlet which has id 3 is chosen
arr[0] = cl.getCloudletId(); //cloudlet id which is going to migrate
arr[1] = cl.getUserId(); // migrating cloudlet's userid
arr[2] = cl.getVmId(); //migrating cloudlet's VM id
arr[3] = 4; //migrating cloudlet's new VM id
arr[4] = getId(); //datacenter idsendNow(getId(), CloudSimTags.CLOUDLET_MOVE, arr); // the Move event is triggered.
}
………;
………;
}