Fixed most of the currently discovered typos.
This commit is contained in:
@@ -32,7 +32,7 @@ public class MainApp {
|
||||
//disable console output of cloudsim library
|
||||
Log.disable();
|
||||
|
||||
//enable console ourput and file output of this application
|
||||
//enable console output and file output of this application
|
||||
SimLogger.enablePrintLog();
|
||||
|
||||
int iterationNumber = 1;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class MainApp {
|
||||
//disable console output of cloudsim library
|
||||
Log.disable();
|
||||
|
||||
//enable console ourput and file output of this application
|
||||
//enable console output and file output of this application
|
||||
SimLogger.enablePrintLog();
|
||||
|
||||
int iterationNumber = 1;
|
||||
|
||||
@@ -91,12 +91,12 @@ public class SampleEdgeOrchestrator extends EdgeOrchestrator {
|
||||
result = SimSettings.GENERIC_EDGE_DEVICE_ID;
|
||||
}
|
||||
else {
|
||||
SimLogger.printLine("Unknow edge orchestrator policy! Terminating simulation...");
|
||||
SimLogger.printLine("Unknown edge orchestrator policy! Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SimLogger.printLine("Unknow simulation scenario! Terminating simulation...");
|
||||
SimLogger.printLine("Unknown simulation scenario! Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class SampleNetworkModel extends NetworkModel {
|
||||
private int[] wanClients;
|
||||
private int[] wlanClients;
|
||||
|
||||
private double lastMM1QueeuUpdateTime;
|
||||
private double lastMM1QueueUpdateTime;
|
||||
private double ManPoissonMeanForDownload; //seconds
|
||||
private double ManPoissonMeanForUpload; //seconds
|
||||
|
||||
@@ -194,7 +194,7 @@ public class SampleNetworkModel extends NetworkModel {
|
||||
SimSettings SS = SimSettings.getInstance();
|
||||
for(int taskIndex=0; taskIndex<numOfApp; taskIndex++) {
|
||||
if(SS.getTaskLookUpTable()[taskIndex][0] == 0) {
|
||||
SimLogger.printLine("Usage percantage of task " + taskIndex + " is 0! Terminating simulation...");
|
||||
SimLogger.printLine("Usage percentage of task " + taskIndex + " is 0! Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
else{
|
||||
@@ -214,7 +214,7 @@ public class SampleNetworkModel extends NetworkModel {
|
||||
avgManTaskInputSize = avgManTaskInputSize/numOfApp;
|
||||
avgManTaskOutputSize = avgManTaskOutputSize/numOfApp;
|
||||
|
||||
lastMM1QueeuUpdateTime = SimSettings.CLIENT_ACTIVITY_START_TIME;
|
||||
lastMM1QueueUpdateTime = SimSettings.CLIENT_ACTIVITY_START_TIME;
|
||||
totalManTaskOutputSize = 0;
|
||||
numOfManTaskForDownload = 0;
|
||||
totalManTaskInputSize = 0;
|
||||
@@ -364,7 +364,7 @@ public class SampleNetworkModel extends NetworkModel {
|
||||
return getWanDownloadDelay(accessPointLocation, dataSize);
|
||||
}
|
||||
|
||||
private double calculateMM1(double propogationDelay, double bandwidth /*Kbps*/, double PoissonMean, double avgTaskSize /*KB*/, int deviceCount){
|
||||
private double calculateMM1(double propagationDelay, double bandwidth /*Kbps*/, double PoissonMean, double avgTaskSize /*KB*/, int deviceCount){
|
||||
double mu=0, lamda=0;
|
||||
|
||||
avgTaskSize = avgTaskSize * 8; //convert from KB to Kb
|
||||
@@ -376,7 +376,7 @@ public class SampleNetworkModel extends NetworkModel {
|
||||
if(result < 0)
|
||||
return 0;
|
||||
|
||||
result += propogationDelay;
|
||||
result += propagationDelay;
|
||||
|
||||
return (result > 15) ? 0 : result;
|
||||
}
|
||||
@@ -412,8 +412,8 @@ public class SampleNetworkModel extends NetworkModel {
|
||||
}
|
||||
|
||||
public void updateMM1QueeuModel(){
|
||||
double lastInterval = CloudSim.clock() - lastMM1QueeuUpdateTime;
|
||||
lastMM1QueeuUpdateTime = CloudSim.clock();
|
||||
double lastInterval = CloudSim.clock() - lastMM1QueueUpdateTime;
|
||||
lastMM1QueueUpdateTime = CloudSim.clock();
|
||||
|
||||
if(numOfManTaskForDownload != 0){
|
||||
ManPoissonMeanForDownload = lastInterval / (numOfManTaskForDownload / (double)numberOfMobileDevices);
|
||||
|
||||
@@ -32,7 +32,7 @@ public class MainApp {
|
||||
//disable console output of cloudsim library
|
||||
Log.disable();
|
||||
|
||||
//enable console ourput and file output of this application
|
||||
//enable console output and file output of this application
|
||||
SimLogger.enablePrintLog();
|
||||
|
||||
int iterationNumber = 1;
|
||||
|
||||
@@ -65,7 +65,7 @@ public class SampleMobileServerManager extends MobileServerManager{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createVmList(int brockerId) {
|
||||
public void createVmList(int brokerId) {
|
||||
//VMs should have unique IDs, so create Mobile VMs after Edge+Cloud VMs
|
||||
int vmCounter=SimSettings.getInstance().getNumOfEdgeVMs() + SimSettings.getInstance().getNumOfCloudVMs();
|
||||
|
||||
@@ -82,7 +82,7 @@ public class SampleMobileServerManager extends MobileServerManager{
|
||||
long bandwidth = 0;
|
||||
|
||||
//VM Parameters
|
||||
MobileVM vm = new MobileVM(vmCounter, brockerId, mips, numOfCores, ram, bandwidth, storage, vmm, new CloudletSchedulerTimeShared());
|
||||
MobileVM vm = new MobileVM(vmCounter, brokerId, mips, numOfCores, ram, bandwidth, storage, vmm, new CloudletSchedulerTimeShared());
|
||||
vmList.get(i).add(vm);
|
||||
vmCounter++;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ public class SampleMobileServerManager extends MobileServerManager{
|
||||
//4. Create Hosts with its id and list of PEs and add them to the list of machines
|
||||
MobileHost host = new MobileHost(
|
||||
//Hosts should have unique IDs, so create Mobile Hosts after Edge+Cloud Hosts
|
||||
i+SimSettings.getInstance().getNumOfEdgeHosts()+SimSettings.getInstance().getNumOfCoudHost(),
|
||||
i+SimSettings.getInstance().getNumOfEdgeHosts()+SimSettings.getInstance().getNumOfCouldHost(),
|
||||
new RamProvisionerSimple(ram),
|
||||
new BwProvisionerSimple(bandwidth), //kbps
|
||||
storage,
|
||||
|
||||
@@ -96,16 +96,16 @@ public class FuzzyEdgeOrchestrator extends EdgeOrchestrator {
|
||||
for(int hostIndex=0; hostIndex<numberOfHost; hostIndex++){
|
||||
List<EdgeVM> vmArray = SimManager.getInstance().getEdgeServerManager().getVmList(hostIndex);
|
||||
|
||||
double totalUtlization=0;
|
||||
double totalUtilization=0;
|
||||
for(int vmIndex=0; vmIndex<vmArray.size(); vmIndex++){
|
||||
totalUtlization += vmArray.get(vmIndex).getCloudletScheduler().getTotalUtilizationOfCpu(CloudSim.clock());
|
||||
totalUtilization += vmArray.get(vmIndex).getCloudletScheduler().getTotalUtilizationOfCpu(CloudSim.clock());
|
||||
}
|
||||
|
||||
double avgUtilization = (totalUtlization / (double)(vmArray.size()));
|
||||
double avgUtilization = (totalUtilization / (double)(vmArray.size()));
|
||||
|
||||
EdgeHost host = (EdgeHost)(vmArray.get(0).getHost()); //all VMs have the same host
|
||||
if(host.getLocation().getServingWlanId() == task.getSubmittedLocation().getServingWlanId()){
|
||||
nearestEdgeUtilization = totalUtlization / (double)(vmArray.size());
|
||||
nearestEdgeUtilization = totalUtilization / (double)(vmArray.size());
|
||||
nearestEdgeHostIndex = hostIndex;
|
||||
}
|
||||
else if(avgUtilization < bestRemoteEdgeUtilization){
|
||||
@@ -220,12 +220,12 @@ public class FuzzyEdgeOrchestrator extends EdgeOrchestrator {
|
||||
result = SimSettings.GENERIC_EDGE_DEVICE_ID;
|
||||
}
|
||||
else {
|
||||
SimLogger.printLine("Unknow edge orchestrator policy! Terminating simulation...");
|
||||
SimLogger.printLine("Unknown edge orchestrator policy! Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SimLogger.printLine("Unknow simulation scenario! Terminating simulation...");
|
||||
SimLogger.printLine("Unknown simulation scenario! Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -187,7 +187,7 @@ public class FuzzyExperimentalNetworkModel extends NetworkModel {
|
||||
SimSettings SS = SimSettings.getInstance();
|
||||
for(int taskIndex=0; taskIndex<numOfApp; taskIndex++) {
|
||||
if(SS.getTaskLookUpTable()[taskIndex][0] == 0) {
|
||||
SimLogger.printLine("Usage percantage of task " + taskIndex + " is 0! Terminating simulation...");
|
||||
SimLogger.printLine("Usage percentage of task " + taskIndex + " is 0! Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
else{
|
||||
@@ -275,7 +275,7 @@ public class FuzzyExperimentalNetworkModel extends NetworkModel {
|
||||
else if (destDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID+1)
|
||||
manClients++;
|
||||
else {
|
||||
SimLogger.printLine("Error - unknoqn device id in FuzzyExperimentalNetworkModel.uploadStarted(. Terminating simulation...");
|
||||
SimLogger.printLine("Error - unknown device id in FuzzyExperimentalNetworkModel.uploadStarted(. Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
@@ -289,7 +289,7 @@ public class FuzzyExperimentalNetworkModel extends NetworkModel {
|
||||
else if (destDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID+1)
|
||||
manClients--;
|
||||
else {
|
||||
SimLogger.printLine("Error - unknoqn device id in FuzzyExperimentalNetworkModel.uploadFinished(. Terminating simulation...");
|
||||
SimLogger.printLine("Error - unknown device id in FuzzyExperimentalNetworkModel.uploadFinished(. Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
@@ -303,7 +303,7 @@ public class FuzzyExperimentalNetworkModel extends NetworkModel {
|
||||
else if(sourceDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID+1)
|
||||
manClients++;
|
||||
else {
|
||||
SimLogger.printLine("Error - unknoqn device id in FuzzyExperimentalNetworkModel.downloadStarted(. Terminating simulation...");
|
||||
SimLogger.printLine("Error - unknown device id in FuzzyExperimentalNetworkModel.downloadStarted(. Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
@@ -317,7 +317,7 @@ public class FuzzyExperimentalNetworkModel extends NetworkModel {
|
||||
else if(sourceDeviceId == SimSettings.GENERIC_EDGE_DEVICE_ID+1)
|
||||
manClients--;
|
||||
else {
|
||||
SimLogger.printLine("Error - unknoqn device id in FuzzyExperimentalNetworkModel.downloadFinished(. Terminating simulation...");
|
||||
SimLogger.printLine("Error - unknown device id in FuzzyExperimentalNetworkModel.downloadFinished(. Terminating simulation...");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class FuzzyMainApp {
|
||||
//disable console output of cloudsim library
|
||||
Log.disable();
|
||||
|
||||
//enable console ourput and file output of this application
|
||||
//enable console output and file output of this application
|
||||
SimLogger.enablePrintLog();
|
||||
|
||||
int iterationNumber = 1;
|
||||
|
||||
Reference in New Issue
Block a user