some minor backward compatible, major backward incompatible changes and code formatting (beautification)

Minor Modifications:

* Indentation issues are fixed
* Typo errors in source code and comments are fixed
* Misspelled parameters in plotTaskFailureReason.m are corrected
* sim_results folder is added to .gitignore file

Backward compatible changes

* The exit code of the application when there is an error is changed from 0 to 1
* Default constructors are added for Location.java, LoadGeneratorModel.java, MobilityModel.java, EdgeOrchestrator.java (this change request coming from a developer)
* public TaskProperty(int mobileDeviceId, double startTime, ExponentialDistribution[] expRngList) is added to TaskProperty.java  (this change request coming from a developer to create a task without task type)
* double getCreationTime() function is added to Task.java
* void reconfigureMips(double mips) function is added to EdgeVM (for future usage)
* gsm_propagation_delay variable is added to config file. SimSettings class is also modified accordingly. You can use it if you have cellular network access in your scenario.
* wlan_range, northern_bound, southern_bound, eastern_bound, western_bound variables are added to config file; and relevant functions are added to SimSettings class. (this change request coming from a developer)

Backward incompatible changes!

 * location_check_interval variable name is changed to location_check_interval in config.properties file. Please update your config files accordingly (remove 'vm_' part)

 * Major modifications are applied in SimLogger class to decrease time complexity. Now the basic results are kept in the memory and saved to the files at the end of the simulation. As a result of this change, the signature of the SimLogger.addLog () function had to be changed. You must add the mobile device id as the first argument. Please update your MobileDeviceManager class accordingly (add task.getCloudletId () as the first argument).
This commit is contained in:
Cagatay Sonmez
2020-10-30 11:06:09 +03:00
parent 1b4a02e7e6
commit 08341c3681
39 changed files with 1089 additions and 645 deletions

View File

@@ -56,7 +56,7 @@ public class CpuUtilizationModel_Custom implements UtilizationModel {
index = 11;
else{
SimLogger.printLine("Unknown VM Type! Terminating simulation...");
System.exit(0);
System.exit(1);
}
return SimSettings.getInstance().getTaskLookUpTable()[task.getTaskType()][index];
}

View File

@@ -121,7 +121,7 @@ public class DefaultMobileDeviceManager extends MobileDeviceManager {
protected void processOtherEvent(SimEvent ev) {
if (ev == null) {
SimLogger.printLine(getName() + ".processOtherEvent(): " + "Error - an event is null! Terminating simulation...");
System.exit(0);
System.exit(1);
return;
}
@@ -162,7 +162,7 @@ public class DefaultMobileDeviceManager extends MobileDeviceManager {
}
default:
SimLogger.printLine(getName() + ".processOtherEvent(): " + "Error - event unknown by this DatacenterBroker. Terminating simulation...");
System.exit(0);
System.exit(1);
break;
}
}
@@ -180,7 +180,8 @@ public class DefaultMobileDeviceManager extends MobileDeviceManager {
task.setSubmittedLocation(currentLocation);
//add related task to log list
SimLogger.getInstance().addLog(task.getCloudletId(),
SimLogger.getInstance().addLog(task.getMobileDeviceId(),
task.getCloudletId(),
task.getTaskType(),
(int)task.getCloudletLength(),
(int)task.getCloudletFileSize(),
@@ -226,7 +227,7 @@ public class DefaultMobileDeviceManager extends MobileDeviceManager {
}
else {
SimLogger.printLine("Unknown nextHopId! Terminating simulation...");
System.exit(0);
System.exit(1);
}
}

View File

@@ -13,11 +13,13 @@ package edu.boun.edgecloudsim.edge_client;
import org.cloudbus.cloudsim.Cloudlet;
import org.cloudbus.cloudsim.UtilizationModel;
import org.cloudbus.cloudsim.core.CloudSim;
import edu.boun.edgecloudsim.utils.Location;
public class Task extends Cloudlet {
private Location submittedLocation;
private double creationTime;
private int type;
private int mobileDeviceId;
private int hostIndex;
@@ -34,6 +36,7 @@ public class Task extends Cloudlet {
utilizationModelBw);
mobileDeviceId = _mobileDeviceId;
creationTime = CloudSim.clock();
}
@@ -80,4 +83,8 @@ public class Task extends Cloudlet {
public int getTaskType(){
return type;
}
public double getCreationTime() {
return creationTime;
}
}

View File

@@ -8,7 +8,7 @@
* CloudSim. It is assumed that the mobile devices operate Hosts
* and VMs like a server. That is why the class names are similar
* to other Cloud and Edge components (to provide consistency).
*
*
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
*/