Commit e5a09a88 authored by Anton Beloglazov's avatar Anton Beloglazov

- Removed some obsolete code

parent 3e2b37f5
......@@ -193,20 +193,6 @@ public abstract class CloudletScheduler {
*/
public abstract List<Double> getCurrentRequestedMips();
// /**
// * Gets the current allocated mips.
// *
// * @return the current allocated mips
// */
// public abstract List<Double> getCurrentAllocatedMips();
//
// /**
// * Gets the total current allocated mips.
// *
// * @return the total current allocated mips
// */
// public abstract double getTotalCurrentAllocatedMips();
/**
* Gets the total current mips for the Cloudlet.
*
......
......@@ -255,40 +255,6 @@ public class CloudletSchedulerDynamicWorkload extends CloudletSchedulerTimeShare
return totalCurrentRequestedMips;
}
// /* (non-Javadoc)
// * @see cloudsim.CloudletScheduler#getTotalCurrentAllocatedMips()
// */
// @Override
// public double getTotalCurrentAllocatedMips() {
// double totalAllocatedMips = 0;
// for (ResCloudlet rcl : getCloudletExecList()) {
// totalAllocatedMips += getTotalCurrentAllocatedMipsForCloudlet(rcl, getPreviousTime());
// }
// return totalAllocatedMips;
//
// }
//
// /* (non-Javadoc)
// * @see cloudsim.CloudletSchedulerTimeShared#getCurrentAllocatedMips()
// */
// @Override
// public List<Double> getCurrentAllocatedMips() {
// double totalAllocatedMips = getTotalCurrentAllocatedMips();
// List<Double> allocatedMips = new ArrayList<Double>();
// for (Double mips : getCurrentMipsShare()) {
// if (totalAllocatedMips == 0) {
// allocatedMips.add(0.0);
// } else if (totalAllocatedMips > mips) {
// allocatedMips.add(mips);
// totalAllocatedMips -= mips;
// } else {
// allocatedMips.add(totalAllocatedMips);
// totalAllocatedMips = 0;
// }
// }
// return allocatedMips;
// }
/**
* Update under allocated mips for cloudlet.
*
......
......@@ -84,19 +84,6 @@ public abstract class VmAllocationPolicy {
*/
public abstract void deallocateHostForVm(Vm vm);
/**
* Trigger a migration from a given virtual machine to a selected
* host.
*
* @param vm the vm
*
* @return $true if the migration succeeds; $false otherwise
*
* @pre $none
* @post $none
*/
//public abstract boolean migrateVm(Vm vm, Host destination);
/**
* Get the host that is executing the given VM belonging to the
* given user.
......
......@@ -170,12 +170,8 @@ public class PowerDatacenter extends Datacenter {
// schedules an event to the next time
if (minTime != Double.MAX_VALUE) {
// if (minTime > currentTime + 0.01 && minTime < getSchedulingInterval()) {
// send(getId(), minTime - currentTime, CloudSimTags.VM_DATACENTER_EVENT);
// } else {
CloudSim.cancelAll(getId(), new PredicateType(CloudSimTags.VM_DATACENTER_EVENT));
send(getId(), getSchedulingInterval(), CloudSimTags.VM_DATACENTER_EVENT);
// }
}
setLastProcessTime(currentTime);
......
......@@ -60,11 +60,6 @@ public class PowerDatacenterNonPowerAware extends PowerDatacenter {
*/
@Override
protected void updateCloudletProcessing() {
// if (isInMigration()) {
// CloudSim.cancelAll(getId(), new PredicateType(CloudSimTags.VM_DATACENTER_EVENT));
// schedule(getId(), getSchedulingInterval(), CloudSimTags.VM_DATACENTER_EVENT);
// return;
// }
if (getCloudletSubmitted() == -1 || getCloudletSubmitted() == CloudSim.clock()) {
CloudSim.cancelAll(getId(), new PredicateType(CloudSimTags.VM_DATACENTER_EVENT));
schedule(getId(), getSchedulingInterval(), CloudSimTags.VM_DATACENTER_EVENT);
......@@ -85,7 +80,6 @@ public class PowerDatacenterNonPowerAware extends PowerDatacenter {
double hostPower = 0.0;
try {
//hostPower = host.getPower() * timeDiff;
hostPower = host.getMaxPower() * timeDiff;
timeframePower += hostPower;
} catch (Exception e) {
......@@ -143,18 +137,14 @@ public class PowerDatacenterNonPowerAware extends PowerDatacenter {
vm.setInMigration(true);
/** VM migration delay = RAM / bandwidth + C (C = 10 sec) **/
send(getId(), (double) vm.getRam() / (vm.getBw() / 8000) + 10, CloudSimTags.VM_MIGRATE, migrate);
send(getId(), vm.getRam() / ((double) vm.getBw() / 8000) + 10, CloudSimTags.VM_MIGRATE, migrate);
}
}
// schedules an event to the next time
if (minTime != Double.MAX_VALUE) {
// if (minTime > currentTime + 0.01 && minTime < getSchedulingInterval()) {
// send(getId(), minTime - currentTime, CloudSimTags.VM_DATACENTER_EVENT);
// } else {
CloudSim.cancelAll(getId(), CloudSim.SIM_ANY);
send(getId(), getSchedulingInterval(), CloudSimTags.VM_DATACENTER_EVENT);
// }
}
setLastProcessTime(currentTime);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment