diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 42df42c..38220c1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,7 +37,7 @@ If you want to specify more things, add additional notes here # How to Contribute to EdgeCloudSim -You can simply follow below steps to contribute to EdgeClouldSim: +You can simply follow below steps to contribute to EdgeCloudSim: 1. Create a working copy (fork the project & clone it) 2. Specify a new remote upstream repository diff --git a/README.md b/README.md index e88f05f..c415f09 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ EdgeCloudSim provides a simulation environment specific to Edge Computing scenar The discussion forum for EdgeCloudSim can be found [here](https://groups.google.com/forum/#!forum/edgecloudsim). We hope to meet with all interested parties in this forum. -Please feel free to join and let us discuss issues, share ideas related to EdgeCloudSim all togerther. +Please feel free to join and let us discuss issues, share ideas related to EdgeCloudSim all together. ## Needed Features diff --git a/scripts/sample_app1/config/default_config.properties b/scripts/sample_app1/config/default_config.properties index a8462a0..8abd908 100644 --- a/scripts/sample_app1/config/default_config.properties +++ b/scripts/sample_app1/config/default_config.properties @@ -10,7 +10,7 @@ min_number_of_mobile_devices=100 max_number_of_mobile_devices=1000 mobile_device_counter_size=100 -wan_propogation_delay=0.1 +wan_propagation_delay=0.1 lan_internal_delay=0.005 wlan_bandwidth=200 wan_bandwidth=15 diff --git a/scripts/sample_app2/config/default_config.properties b/scripts/sample_app2/config/default_config.properties index 3f37780..68c237d 100644 --- a/scripts/sample_app2/config/default_config.properties +++ b/scripts/sample_app2/config/default_config.properties @@ -10,7 +10,7 @@ min_number_of_mobile_devices=200 max_number_of_mobile_devices=2000 mobile_device_counter_size=200 -wan_propogation_delay=0.1 +wan_propagation_delay=0.1 lan_internal_delay=0.005 wlan_bandwidth=0 wan_bandwidth=0 diff --git a/scripts/sample_app3/config/default_config.properties b/scripts/sample_app3/config/default_config.properties index a19a3ac..830d1a6 100644 --- a/scripts/sample_app3/config/default_config.properties +++ b/scripts/sample_app3/config/default_config.properties @@ -10,7 +10,7 @@ min_number_of_mobile_devices=200 max_number_of_mobile_devices=2000 mobile_device_counter_size=200 -wan_propogation_delay=0.1 +wan_propagation_delay=0.1 lan_internal_delay=0.005 wlan_bandwidth=0 wan_bandwidth=0 diff --git a/scripts/sample_app4/config/default_config.properties b/scripts/sample_app4/config/default_config.properties index 027d409..9b58b8d 100644 --- a/scripts/sample_app4/config/default_config.properties +++ b/scripts/sample_app4/config/default_config.properties @@ -10,7 +10,7 @@ min_number_of_mobile_devices=200 max_number_of_mobile_devices=2400 mobile_device_counter_size=200 -wan_propogation_delay=0.1 +wan_propagation_delay=0.1 lan_internal_delay=0.005 wlan_bandwidth=0 wan_bandwidth=0 diff --git a/src/edu/boun/edgecloudsim/applications/sample_app1/MainApp.java b/src/edu/boun/edgecloudsim/applications/sample_app1/MainApp.java index fa17b12..6e47080 100644 --- a/src/edu/boun/edgecloudsim/applications/sample_app1/MainApp.java +++ b/src/edu/boun/edgecloudsim/applications/sample_app1/MainApp.java @@ -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; diff --git a/src/edu/boun/edgecloudsim/applications/sample_app2/MainApp.java b/src/edu/boun/edgecloudsim/applications/sample_app2/MainApp.java index b88a31d..a25df0c 100644 --- a/src/edu/boun/edgecloudsim/applications/sample_app2/MainApp.java +++ b/src/edu/boun/edgecloudsim/applications/sample_app2/MainApp.java @@ -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; diff --git a/src/edu/boun/edgecloudsim/applications/sample_app2/SampleEdgeOrchestrator.java b/src/edu/boun/edgecloudsim/applications/sample_app2/SampleEdgeOrchestrator.java index c1baa03..4d98dd5 100644 --- a/src/edu/boun/edgecloudsim/applications/sample_app2/SampleEdgeOrchestrator.java +++ b/src/edu/boun/edgecloudsim/applications/sample_app2/SampleEdgeOrchestrator.java @@ -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; diff --git a/src/edu/boun/edgecloudsim/applications/sample_app2/SampleNetworkModel.java b/src/edu/boun/edgecloudsim/applications/sample_app2/SampleNetworkModel.java index 19ecf6e..6a5c63f 100644 --- a/src/edu/boun/edgecloudsim/applications/sample_app2/SampleNetworkModel.java +++ b/src/edu/boun/edgecloudsim/applications/sample_app2/SampleNetworkModel.java @@ -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 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); diff --git a/src/edu/boun/edgecloudsim/applications/sample_app3/MainApp.java b/src/edu/boun/edgecloudsim/applications/sample_app3/MainApp.java index e319b99..a27dab9 100644 --- a/src/edu/boun/edgecloudsim/applications/sample_app3/MainApp.java +++ b/src/edu/boun/edgecloudsim/applications/sample_app3/MainApp.java @@ -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; diff --git a/src/edu/boun/edgecloudsim/applications/sample_app3/SampleMobileServerManager.java b/src/edu/boun/edgecloudsim/applications/sample_app3/SampleMobileServerManager.java index 8757969..8e09050 100644 --- a/src/edu/boun/edgecloudsim/applications/sample_app3/SampleMobileServerManager.java +++ b/src/edu/boun/edgecloudsim/applications/sample_app3/SampleMobileServerManager.java @@ -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, diff --git a/src/edu/boun/edgecloudsim/applications/sample_app4/FuzzyEdgeOrchestrator.java b/src/edu/boun/edgecloudsim/applications/sample_app4/FuzzyEdgeOrchestrator.java index d4df2f3..188b46f 100644 --- a/src/edu/boun/edgecloudsim/applications/sample_app4/FuzzyEdgeOrchestrator.java +++ b/src/edu/boun/edgecloudsim/applications/sample_app4/FuzzyEdgeOrchestrator.java @@ -96,16 +96,16 @@ public class FuzzyEdgeOrchestrator extends EdgeOrchestrator { for(int hostIndex=0; hostIndex vmArray = SimManager.getInstance().getEdgeServerManager().getVmList(hostIndex); - double totalUtlization=0; + double totalUtilization=0; for(int vmIndex=0; vmIndex()); for(int j = 0; j < SimSettings.getInstance().getNumOfCloudVMsPerHost(); j++){ String vmm = "Xen"; @@ -69,7 +69,7 @@ public class DefaultCloudServerManager extends CloudServerManager{ long bandwidth = 0; //VM Parameters - CloudVM vm = new CloudVM(vmCounter, brockerId, mips, numOfCores, ram, bandwidth, storage, vmm, new CloudletSchedulerTimeShared()); + CloudVM vm = new CloudVM(vmCounter, brokerId, mips, numOfCores, ram, bandwidth, storage, vmm, new CloudletSchedulerTimeShared()); vmList.get(i).add(vm); vmCounter++; } @@ -131,7 +131,7 @@ public class DefaultCloudServerManager extends CloudServerManager{ // 1. We need to create a list to store one or more Machines List hostList = new ArrayList(); - for (int i = 0; i < SimSettings.getInstance().getNumOfCoudHost(); i++) { + for (int i = 0; i < SimSettings.getInstance().getNumOfCouldHost(); i++) { int numOfVMPerHost = SimSettings.getInstance().getNumOfCloudVMsPerHost(); int numOfCores = SimSettings.getInstance().getCoreForCloudVM() * numOfVMPerHost; double mips = SimSettings.getInstance().getMipsForCloudVM() * numOfVMPerHost; diff --git a/src/edu/boun/edgecloudsim/core/SimManager.java b/src/edu/boun/edgecloudsim/core/SimManager.java index 1f0fa3b..e6a3f34 100644 --- a/src/edu/boun/edgecloudsim/core/SimManager.java +++ b/src/edu/boun/edgecloudsim/core/SimManager.java @@ -185,7 +185,7 @@ public class SimManager extends SimEntity { } } - for(int i= 0; i 0){ networkModel.uploadStarted(currentLocation, nextHopId); - schedule(getId(), WlanDelay, REQUEST_RECIVED_BY_EDGE_DEVICE, task); + schedule(getId(), WlanDelay, REQUEST_RECEIVED_BY_EDGE_DEVICE, task); SimLogger.getInstance().taskStarted(task.getCloudletId(), CloudSim.clock()); SimLogger.getInstance().setUploadDelay(task.getCloudletId(), WlanDelay, NETWORK_DELAY_TYPES.WLAN_DELAY); } diff --git a/src/edu/boun/edgecloudsim/edge_client/mobile_processing_unit/DefaultMobileServerManager.java b/src/edu/boun/edgecloudsim/edge_client/mobile_processing_unit/DefaultMobileServerManager.java index d8109b6..14b834d 100644 --- a/src/edu/boun/edgecloudsim/edge_client/mobile_processing_unit/DefaultMobileServerManager.java +++ b/src/edu/boun/edgecloudsim/edge_client/mobile_processing_unit/DefaultMobileServerManager.java @@ -46,7 +46,7 @@ public class DefaultMobileServerManager extends MobileServerManager{ } @Override - public void createVmList(int brockerId) { + public void createVmList(int brokerId) { //local computation is not supported in default Mobile Device Manager } diff --git a/src/edu/boun/edgecloudsim/edge_client/mobile_processing_unit/MobileServerManager.java b/src/edu/boun/edgecloudsim/edge_client/mobile_processing_unit/MobileServerManager.java index b64ba18..c1d5ace 100644 --- a/src/edu/boun/edgecloudsim/edge_client/mobile_processing_unit/MobileServerManager.java +++ b/src/edu/boun/edgecloudsim/edge_client/mobile_processing_unit/MobileServerManager.java @@ -69,7 +69,7 @@ public abstract class MobileServerManager { /* * Creates VM List */ - public abstract void createVmList(int brockerId); + public abstract void createVmList(int brokerId); /* * returns average utilization of all VMs diff --git a/src/edu/boun/edgecloudsim/edge_client/mobile_processing_unit/MobileVmAllocationPolicy_Custom.java b/src/edu/boun/edgecloudsim/edge_client/mobile_processing_unit/MobileVmAllocationPolicy_Custom.java index 2aae6bb..b7f03b2 100644 --- a/src/edu/boun/edgecloudsim/edge_client/mobile_processing_unit/MobileVmAllocationPolicy_Custom.java +++ b/src/edu/boun/edgecloudsim/edge_client/mobile_processing_unit/MobileVmAllocationPolicy_Custom.java @@ -58,7 +58,7 @@ public class MobileVmAllocationPolicy_Custom extends VmAllocationPolicy { Host host = getHostList().get(hostIndex); result = host.vmCreate(vm); - if (result) { // if vm were succesfully created in the host + if (result) { // if vm were successfully created in the host getVmTable().put(vm.getUid(), host); createdVmNum++; Log.formatLine("%.2f: Mobile VM #" + vm.getId() + " has been allocated to the host #" + host.getId(),CloudSim.clock()); @@ -72,7 +72,7 @@ public class MobileVmAllocationPolicy_Custom extends VmAllocationPolicy { @Override public boolean allocateHostForVm(Vm vm, Host host) { - if (host.vmCreate(vm)) { // if vm has been succesfully created in the host + if (host.vmCreate(vm)) { // if vm has been successfully created in the host getVmTable().put(vm.getUid(), host); createdVmNum++; diff --git a/src/edu/boun/edgecloudsim/edge_orchestrator/EdgeOrchestrator.java b/src/edu/boun/edgecloudsim/edge_orchestrator/EdgeOrchestrator.java index 7b8e7d5..22af7cc 100644 --- a/src/edu/boun/edgecloudsim/edge_orchestrator/EdgeOrchestrator.java +++ b/src/edu/boun/edgecloudsim/edge_orchestrator/EdgeOrchestrator.java @@ -5,7 +5,7 @@ * EdgeOrchestrator is an abstract class which is used for selecting VM * for each client requests. For those who wants to add a custom * Edge Orchestrator to EdgeCloudSim should extend this class and provide - * a concreate instance via ScenarioFactory + * a concrete instance via ScenarioFactory * * Licence: GPL - http://www.gnu.org/copyleft/gpl.html * Copyright (c) 2017, Bogazici University, Istanbul, Turkey diff --git a/src/edu/boun/edgecloudsim/edge_server/DefaultEdgeServerManager.java b/src/edu/boun/edgecloudsim/edge_server/DefaultEdgeServerManager.java index 7a6b9d0..29fec87 100644 --- a/src/edu/boun/edgecloudsim/edge_server/DefaultEdgeServerManager.java +++ b/src/edu/boun/edgecloudsim/edge_server/DefaultEdgeServerManager.java @@ -63,7 +63,7 @@ public class DefaultEdgeServerManager extends EdgeServerManager{ } } - public void createVmList(int brockerId){ + public void createVmList(int brokerId){ int hostCounter=0; int vmCounter=0; @@ -93,7 +93,7 @@ public class DefaultEdgeServerManager extends EdgeServerManager{ long bandwidth = SimSettings.getInstance().getWlanBandwidth() / (hostNodeList.getLength()+vmNodeList.getLength()); //VM Parameters - EdgeVM vm = new EdgeVM(vmCounter, brockerId, mips, numOfCores, ram, bandwidth, storage, vmm, new CloudletSchedulerTimeShared()); + EdgeVM vm = new EdgeVM(vmCounter, brokerId, mips, numOfCores, ram, bandwidth, storage, vmm, new CloudletSchedulerTimeShared()); vmList.get(hostCounter).add(vm); vmCounter++; } diff --git a/src/edu/boun/edgecloudsim/edge_server/EdgeServerManager.java b/src/edu/boun/edgecloudsim/edge_server/EdgeServerManager.java index 6e2938e..e43b49d 100644 --- a/src/edu/boun/edgecloudsim/edge_server/EdgeServerManager.java +++ b/src/edu/boun/edgecloudsim/edge_server/EdgeServerManager.java @@ -62,7 +62,7 @@ public abstract class EdgeServerManager { /* * Creates VM List */ - public abstract void createVmList(int brockerId); + public abstract void createVmList(int brokerId); /* * returns average utilization of all VMs diff --git a/src/edu/boun/edgecloudsim/edge_server/EdgeVmAllocationPolicy_Custom.java b/src/edu/boun/edgecloudsim/edge_server/EdgeVmAllocationPolicy_Custom.java index 558a3af..2d02b1b 100644 --- a/src/edu/boun/edgecloudsim/edge_server/EdgeVmAllocationPolicy_Custom.java +++ b/src/edu/boun/edgecloudsim/edge_server/EdgeVmAllocationPolicy_Custom.java @@ -84,7 +84,7 @@ public class EdgeVmAllocationPolicy_Custom extends VmAllocationPolicy { Host host = getHostList().get(hostIndex); result = host.vmCreate(vm); - if (result) { // if vm were succesfully created in the host + if (result) { // if vm were successfully created in the host getVmTable().put(vm.getUid(), host); createdVmNum++; Log.formatLine("%.2f: Edge VM #" + vm.getId() + " has been allocated to the host #" + host.getId(),CloudSim.clock()); diff --git a/src/edu/boun/edgecloudsim/mobility/MobilityModel.java b/src/edu/boun/edgecloudsim/mobility/MobilityModel.java index 0168302..a66084b 100644 --- a/src/edu/boun/edgecloudsim/mobility/MobilityModel.java +++ b/src/edu/boun/edgecloudsim/mobility/MobilityModel.java @@ -5,7 +5,7 @@ * MobilityModel is an abstract class which is used for calculating the * location of each mobile devices with respect to the time. For those who * wants to add a custom Mobility Model to EdgeCloudSim should extend - * this class and provide a concreate instance via ScenarioFactory + * this class and provide a concrete instance via ScenarioFactory * * Licence: GPL - http://www.gnu.org/copyleft/gpl.html * Copyright (c) 2017, Bogazici University, Istanbul, Turkey diff --git a/src/edu/boun/edgecloudsim/mobility/NomadicMobility.java b/src/edu/boun/edgecloudsim/mobility/NomadicMobility.java index bed2081..2e6cc8d 100644 --- a/src/edu/boun/edgecloudsim/mobility/NomadicMobility.java +++ b/src/edu/boun/edgecloudsim/mobility/NomadicMobility.java @@ -98,7 +98,7 @@ public class NomadicMobility extends MobilityModel { } } if(!placeFound){ - SimLogger.printLine("impossible is occured! location cannot be assigned to the device!"); + SimLogger.printLine("impossible is occurred! location cannot be assigned to the device!"); System.exit(0); } } @@ -113,7 +113,7 @@ public class NomadicMobility extends MobilityModel { Entry e = treeMap.floorEntry(time); if(e == null){ - SimLogger.printLine("impossible is occured! no location is found for the device '" + deviceId + "' at " + time); + SimLogger.printLine("impossible is occurred! no location is found for the device '" + deviceId + "' at " + time); System.exit(0); } diff --git a/src/edu/boun/edgecloudsim/network/MM1Queue.java b/src/edu/boun/edgecloudsim/network/MM1Queue.java index 5ab1fb0..160bd54 100644 --- a/src/edu/boun/edgecloudsim/network/MM1Queue.java +++ b/src/edu/boun/edgecloudsim/network/MM1Queue.java @@ -122,7 +122,7 @@ public class MM1Queue extends NetworkModel { getHostList().get(0)); //if source device id is the edge server which is located in another location, add internal lan delay - //in our scenasrio, serving wlan ID is equal to the host id, because there is only one host in one place + //in our scenario, serving wlan ID is equal to the host id, because there is only one host in one place if(host.getLocation().getServingWlanId() != accessPointLocation.getServingWlanId()) delay += (SimSettings.getInstance().getInternalLanDelay() * 2); } @@ -150,7 +150,7 @@ public class MM1Queue extends NetworkModel { return deviceCount; } - private double calculateMM1(double propogationDelay, int bandwidth /*Kbps*/, double PoissonMean, double avgTaskSize /*KB*/, int deviceCount){ + private double calculateMM1(double propagationDelay, int bandwidth /*Kbps*/, double PoissonMean, double avgTaskSize /*KB*/, int deviceCount){ double Bps=0, mu=0, lamda=0; avgTaskSize = avgTaskSize * (double)1000; //convert from KB to Byte @@ -160,7 +160,7 @@ public class MM1Queue extends NetworkModel { mu = Bps / avgTaskSize ; //task per seconds double result = (double)1 / (mu-lamda*(double)deviceCount); - result += propogationDelay; + result += propagationDelay; return (result > 5) ? -1 : result; } @@ -182,7 +182,7 @@ public class MM1Queue extends NetworkModel { } private double getWanDownloadDelay(Location accessPointLocation, double time) { - return calculateMM1(SimSettings.getInstance().getWanPropogationDelay(), + return calculateMM1(SimSettings.getInstance().getWanPropagationDelay(), SimSettings.getInstance().getWanBandwidth(), WanPoissonMean, avgTaskOutputSize, @@ -190,7 +190,7 @@ public class MM1Queue extends NetworkModel { } private double getWanUploadDelay(Location accessPointLocation, double time) { - return calculateMM1(SimSettings.getInstance().getWanPropogationDelay(), + return calculateMM1(SimSettings.getInstance().getWanPropagationDelay(), SimSettings.getInstance().getWanBandwidth(), WanPoissonMean, avgTaskInputSize, diff --git a/src/edu/boun/edgecloudsim/network/NetworkModel.java b/src/edu/boun/edgecloudsim/network/NetworkModel.java index 0937d53..e912654 100644 --- a/src/edu/boun/edgecloudsim/network/NetworkModel.java +++ b/src/edu/boun/edgecloudsim/network/NetworkModel.java @@ -5,7 +5,7 @@ * NetworkModel is an abstract class which is used for calculating the * network delay from device to device. For those who wants to add a * custom Network Model to EdgeCloudSim should extend this class and - * provide a concreate instance via ScenarioFactory + * provide a concrete instance via ScenarioFactory * * Licence: GPL - http://www.gnu.org/copyleft/gpl.html * Copyright (c) 2017, Bogazici University, Istanbul, Turkey diff --git a/src/edu/boun/edgecloudsim/task_generator/IdleActiveLoadGenerator.java b/src/edu/boun/edgecloudsim/task_generator/IdleActiveLoadGenerator.java index 5a65ac8..8856e58 100644 --- a/src/edu/boun/edgecloudsim/task_generator/IdleActiveLoadGenerator.java +++ b/src/edu/boun/edgecloudsim/task_generator/IdleActiveLoadGenerator.java @@ -78,7 +78,7 @@ public class IdleActiveLoadGenerator extends LoadGeneratorModel{ double interval = rng.sample(); if(interval <= 0){ - SimLogger.printLine("Impossible is occured! interval is " + interval + " for device " + i + " time " + virtualTime); + SimLogger.printLine("Impossible is occurred! interval is " + interval + " for device " + i + " time " + virtualTime); continue; } //SimLogger.printLine(virtualTime + " -> " + interval + " for device " + i + " time "); diff --git a/src/edu/boun/edgecloudsim/task_generator/LoadGeneratorModel.java b/src/edu/boun/edgecloudsim/task_generator/LoadGeneratorModel.java index 72fd06a..9d518c4 100644 --- a/src/edu/boun/edgecloudsim/task_generator/LoadGeneratorModel.java +++ b/src/edu/boun/edgecloudsim/task_generator/LoadGeneratorModel.java @@ -5,7 +5,7 @@ * LoadGeneratorModel is an abstract class which is used for * deciding task generation pattern via a task list. For those who * wants to add a custom Load Generator Model to EdgeCloudSim should - * extend this class and provide a concreate instance via ScenarioFactory + * extend this class and provide a concrete instance via ScenarioFactory * * Licence: GPL - http://www.gnu.org/copyleft/gpl.html * Copyright (c) 2017, Bogazici University, Istanbul, Turkey diff --git a/src/edu/boun/edgecloudsim/utils/PoissonDistr.java b/src/edu/boun/edgecloudsim/utils/PoissonDistr.java index 84b60a5..9e3dc98 100644 --- a/src/edu/boun/edgecloudsim/utils/PoissonDistr.java +++ b/src/edu/boun/edgecloudsim/utils/PoissonDistr.java @@ -1,8 +1,8 @@ /* * Title: EdgeCloudSim - Poisson Distribution - * + * * Description: Wrapper class for colt Poisson Distribution - * + * * Licence: GPL - http://www.gnu.org/copyleft/gpl.html * Copyright (c) 2017, Bogazici University, Istanbul, Turkey */ @@ -22,18 +22,18 @@ public class PoissonDistr { /** * Creates a new exponential number generator. - * + * * @param mean the mean for the distribution. */ public PoissonDistr(double mean) { engine = new MersenneTwister(new Date()); poisson = new Poisson(mean, engine); - + //always sleep for some milliseconds in order not to have same seed for iterative PoissonDistr contruction try { TimeUnit.MILLISECONDS.sleep(10); } catch (InterruptedException e) { - SimLogger.printLine("impossible is occured! Poisson random number cannot be created!"); + SimLogger.printLine("impossible is occurred! Poisson random number cannot be created!"); e.printStackTrace(); System.exit(0); } @@ -41,10 +41,10 @@ public class PoissonDistr { /** * Generate a new random number. - * + * * @return the next random number in the sequence */ - public double sample() { + public double sample() { return poisson.nextDouble(); } } diff --git a/src/edu/boun/edgecloudsim/utils/SimLogger.java b/src/edu/boun/edgecloudsim/utils/SimLogger.java index 0478e2d..b6563ff 100644 --- a/src/edu/boun/edgecloudsim/utils/SimLogger.java +++ b/src/edu/boun/edgecloudsim/utils/SimLogger.java @@ -31,7 +31,7 @@ import edu.boun.edgecloudsim.utils.SimLogger.NETWORK_ERRORS; public class SimLogger { public static enum TASK_STATUS { - CREATED, UPLOADING, PROCESSING, DOWNLOADING, COMLETED, REJECTED_DUE_TO_VM_CAPACITY, REJECTED_DUE_TO_BANDWIDTH, UNFINISHED_DUE_TO_BANDWIDTH, UNFINISHED_DUE_TO_MOBILITY + CREATED, UPLOADING, PROCESSING, DOWNLOADING, COMPLETED, REJECTED_DUE_TO_VM_CAPACITY, REJECTED_DUE_TO_BANDWIDTH, UNFINISHED_DUE_TO_BANDWIDTH, UNFINISHED_DUE_TO_MOBILITY } public static enum NETWORK_ERRORS { @@ -264,7 +264,7 @@ public class SimLogger { if (value.isInWarmUpPeriod()) continue; - if (value.getStatus() == SimLogger.TASK_STATUS.COMLETED) { + if (value.getStatus() == SimLogger.TASK_STATUS.COMPLETED) { completedTask[value.getTaskType()]++; if (value.getVmType() == SimSettings.VM_TYPES.CLOUD_VM.ordinal()) @@ -298,7 +298,7 @@ public class SimLogger { failedTaskOnEdge[value.getTaskType()]++; } - if (value.getStatus() == SimLogger.TASK_STATUS.COMLETED) { + if (value.getStatus() == SimLogger.TASK_STATUS.COMPLETED) { cost[value.getTaskType()] += value.getCost(); serviceTime[value.getTaskType()] += value.getServiceTime(); networkDelay[value.getTaskType()] += value.getNetworkDelay(); @@ -705,9 +705,9 @@ class LogItem { private double cpuCost; private boolean isInWarmUpPeriod; - LogItem(int _taskType, int _taskLenght, int _taskInputType, int _taskOutputSize) { + LogItem(int _taskType, int _taskLength, int _taskInputType, int _taskOutputSize) { taskType = _taskType; - taskLenght = _taskLenght; + taskLenght = _taskLength; taskInputType = _taskInputType; taskOutputSize = _taskOutputSize; networkError = NETWORK_ERRORS.NONE; @@ -757,7 +757,7 @@ class LogItem { public void taskEnded(double time) { taskEndTime = time; - status = SimLogger.TASK_STATUS.COMLETED; + status = SimLogger.TASK_STATUS.COMPLETED; } public void taskRejectedDueToVMCapacity(double time, int _vmType) { @@ -881,7 +881,7 @@ class LogItem { + taskOutputSize + SimSettings.DELIMITER + taskStartTime + SimSettings.DELIMITER + taskEndTime + SimSettings.DELIMITER; - if (status == SimLogger.TASK_STATUS.COMLETED){ + if (status == SimLogger.TASK_STATUS.COMPLETED){ result += getNetworkDelay() + SimSettings.DELIMITER; result += getNetworkDelay(NETWORK_DELAY_TYPES.WLAN_DELAY) + SimSettings.DELIMITER; result += getNetworkDelay(NETWORK_DELAY_TYPES.MAN_DELAY) + SimSettings.DELIMITER;