Sample application 4 which is used in IEEE TNSM journal paper is published.
Important Notes: * EdgeTask class name is updated as TaskProperty. You may need to modify your existing application's source code if you use EdgeTask class in your application.
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - EdgeTask
|
||||
*
|
||||
* Description:
|
||||
* A custom class used in Load Generator Model to store tasks information
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.utils;
|
||||
|
||||
import org.apache.commons.math3.distribution.ExponentialDistribution;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
|
||||
public class EdgeTask {
|
||||
public double startTime;
|
||||
public long length, inputFileSize, outputFileSize;
|
||||
public int taskType;
|
||||
public int pesNumber;
|
||||
public int mobileDeviceId;
|
||||
|
||||
public EdgeTask(int _mobileDeviceId, int _taskType, double _startTime, ExponentialDistribution[][] expRngList) {
|
||||
mobileDeviceId=_mobileDeviceId;
|
||||
startTime=_startTime;
|
||||
taskType=_taskType;
|
||||
|
||||
inputFileSize = (long)expRngList[_taskType][0].sample();
|
||||
outputFileSize =(long)expRngList[_taskType][1].sample();
|
||||
length = (long)expRngList[_taskType][2].sample();
|
||||
|
||||
pesNumber = (int)SimSettings.getInstance().getTaskLookUpTable()[_taskType][8];
|
||||
}
|
||||
}
|
||||
73
src/edu/boun/edgecloudsim/utils/TaskProperty.java
Normal file
73
src/edu/boun/edgecloudsim/utils/TaskProperty.java
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Title: EdgeCloudSim - EdgeTask
|
||||
*
|
||||
* Description:
|
||||
* A custom class used in Load Generator Model to store tasks information
|
||||
*
|
||||
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
|
||||
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
|
||||
*/
|
||||
|
||||
package edu.boun.edgecloudsim.utils;
|
||||
|
||||
import org.apache.commons.math3.distribution.ExponentialDistribution;
|
||||
|
||||
import edu.boun.edgecloudsim.core.SimSettings;
|
||||
|
||||
public class TaskProperty {
|
||||
private double startTime;
|
||||
private long length, inputFileSize, outputFileSize;
|
||||
private int taskType;
|
||||
private int pesNumber;
|
||||
private int mobileDeviceId;
|
||||
|
||||
public TaskProperty(double _startTime, int _mobileDeviceId, int _taskType, int _pesNumber, long _length, long _inputFileSize, long _outputFileSize) {
|
||||
startTime=_startTime;
|
||||
mobileDeviceId=_mobileDeviceId;
|
||||
taskType=_taskType;
|
||||
pesNumber = _pesNumber;
|
||||
length = _length;
|
||||
outputFileSize = _inputFileSize;
|
||||
inputFileSize = _outputFileSize;
|
||||
}
|
||||
|
||||
public TaskProperty(int _mobileDeviceId, int _taskType, double _startTime, ExponentialDistribution[][] expRngList) {
|
||||
mobileDeviceId=_mobileDeviceId;
|
||||
startTime=_startTime;
|
||||
taskType=_taskType;
|
||||
|
||||
inputFileSize = (long)expRngList[_taskType][0].sample();
|
||||
outputFileSize =(long)expRngList[_taskType][1].sample();
|
||||
length = (long)expRngList[_taskType][2].sample();
|
||||
|
||||
pesNumber = (int)SimSettings.getInstance().getTaskLookUpTable()[_taskType][8];
|
||||
}
|
||||
|
||||
public double getStartTime(){
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public long getLength(){
|
||||
return length;
|
||||
}
|
||||
|
||||
public long getInputFileSize(){
|
||||
return inputFileSize;
|
||||
}
|
||||
|
||||
public long getOutputFileSize(){
|
||||
return outputFileSize;
|
||||
}
|
||||
|
||||
public int getTaskType(){
|
||||
return taskType;
|
||||
}
|
||||
|
||||
public int getPesNumber(){
|
||||
return pesNumber;
|
||||
}
|
||||
|
||||
public int getMobileDeviceId(){
|
||||
return mobileDeviceId;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user