Skip to content

Commit 7d976ce

Browse files
minor fixes
1 parent e2e2c7b commit 7d976ce

File tree

194 files changed

+296
-591
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+296
-591
lines changed

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

PureEdgeSim/com/mechalikh/pureedgesim/SimulationManager/SimLog.java

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -523,15 +523,21 @@ public void incrementTasksFailedLackOfRessources(Task task) {
523523

524524
public void getTasksExecutionInfos(Task task) {
525525
this.totalExecutionTime += task.getActualCpuTime();
526-
if(task.getReceptionTime()!= -1) // the task is offloaded or a container has been downloaded
527-
// in this case don't include the network utilisation time in the waiting time
528-
// so the waiting time will be the time between the reception of the task (or the conatiner) by the destination and the time of execution
529-
this.totalWaitingTime += task.getExecStartTime() - task.getReceptionTime();
530-
else
531-
// in case the task is not offloaded, and no container has been downloaded ( no network usage)
532-
//the waitingdelay will be the difference between the tasks execution time and the task generation time
533-
this.totalWaitingTime+= task.getExecStartTime() - task.getTime();
526+
if (task.getReceptionTime() != -1) // the task is offloaded or a container has been downloaded
527+
// in this case don't include the network utilisation time in the waiting time
528+
// so the waiting time will be the time between the reception of the task (or
529+
// the conatiner) by the destination and the time of execution
530+
this.totalWaitingTime += task.getExecStartTime() - task.getReceptionTime();
531+
else
532+
// in case the task is not offloaded, and no container has been downloaded ( no
533+
// network usage)
534+
// the waitingdelay will be the difference between the tasks execution time and
535+
// the task generation time
536+
this.totalWaitingTime += task.getExecStartTime() - task.getTime();
534537
this.executedTasksCount++;
538+
}
539+
540+
public void taskSentFromOrchToDest(Task task) {
535541
if (((EdgeVM) task.getVm()).getType() == simulationParameters.TYPES.CLOUD) {
536542
this.tasksExecutedOnCloud++;
537543
} else if (((EdgeVM) task.getVm()).getType() == simulationParameters.TYPES.FOG) {
@@ -544,7 +550,7 @@ public void getTasksExecutionInfos(Task task) {
544550
public void updateNetworkUsage(FileTransferProgress transfer) {
545551
this.totalLanUsage += transfer.getLanNetworkUsage();
546552
this.totalWanUsage += transfer.getWanNetworkUsage();
547-
this.totalBandwidth += transfer.getAverageBandwidth()/1000; // Kbits/s to Mbits/s
553+
this.totalBandwidth += transfer.getAverageBandwidth() / 1000; // Kbits/s to Mbits/s
548554
this.totalTraffic += transfer.getFileSize() / 8000; // Kbits to Mbytes
549555

550556
if (transfer.getTransferType() == FileTransferProgress.Type.CONTAINER) {

PureEdgeSim/com/mechalikh/pureedgesim/SimulationManager/SimulationManager.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
import com.mechalikh.pureedgesim.DataCentersManager.ServersManager;
1111
import com.mechalikh.pureedgesim.Network.NetworkModel;
1212
import com.mechalikh.pureedgesim.ScenarioManager.Scenario;
13-
import com.mechalikh.pureedgesim.ScenarioManager.simulationParameters;
13+
import com.mechalikh.pureedgesim.ScenarioManager.simulationParameters;
14+
import com.mechalikh.pureedgesim.ScenarioManager.simulationParameters.TYPES;
1415
import com.mechalikh.pureedgesim.TasksGenerator.Task;
1516
import com.mechalikh.pureedgesim.TasksOrchestration.CustomBroker;
1617
import com.mechalikh.pureedgesim.TasksOrchestration.Orchestrator;
@@ -218,6 +219,7 @@ private void sendResultsToOchestrator(Task task) {
218219
private void sendFromOrchToDestination(Task task) {
219220
if (taskFailed(task, 1))
220221
return;
222+
221223
// Find the best VM for executing the task
222224
edgeOrchestrator.initialize(task);
223225

@@ -227,7 +229,9 @@ private void sendFromOrchToDestination(Task task) {
227229
simLog.incrementTasksFailedLackOfRessources(task);
228230
tasksCount++;
229231
return;
230-
}
232+
} else
233+
simLog.taskSentFromOrchToDest(task);
234+
231235
// If the task is offloaded
232236
// and the orchestrator is not the offloading destination
233237
if (task.getEdgeDevice().getId() != task.getVm().getHost().getDatacenter().getId()
@@ -239,7 +243,7 @@ private void sendFromOrchToDestination(Task task) {
239243
scheduleNow(this, EXECUTE_TASK, task);
240244
}
241245
}
242-
246+
243247
private void sendTaskToOrchestrator(Task task) {
244248
if (taskFailed(task, 0))
245249
return;
@@ -378,7 +382,8 @@ public boolean taskFailed(Task task, int phase) {
378382
return false;
379383
}
380384

381-
private boolean sameLocation(EdgeDataCenter Dev1, EdgeDataCenter Dev2) {
385+
private boolean sameLocation(EdgeDataCenter Dev1, EdgeDataCenter Dev2) {
386+
if(Dev1.getType()==TYPES.CLOUD || Dev2.getType()== TYPES.CLOUD) return true;
382387
double distance = Math.abs(Math.sqrt(Math.pow((Dev1.getLocation().getXPos() - Dev2.getLocation().getXPos()), 2)
383388
+ Math.pow((Dev1.getLocation().getYPos() - Dev2.getLocation().getYPos()), 2)));
384389
int RANGE = simulationParameters.EDGE_RANGE;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Orchestration architecture,Orchestration algorithm,Edge devices count,Tasks execution delay (s),Average execution delay (s),Tasks waiting time (s),Average wainting time (s),Generated tasks,Tasks successfully executed,Task not executed (No resources available or long waiting time),Tasks failed (delay),Tasks failed (device dead),Tasks failed (mobility),Tasks not generated due to the death of devices,Total tasks executed (Cloud),Tasks successfully executed (Cloud),Total tasks executed (Fog),Tasks successfully executed (Fog),Total tasks executed (Edge),Tasks successfully executed (Edge),Network usage (s),Wan usage (s),Lan usage (s), Total network traffic (MBytes), Containers wan usage (s), Containers lan usage (s),Average bandwidth per task (Mbps),Average VM CPU usage (%),Average VM CPU usage (Cloud) (%),Average VM CPU usage (Fog) (%),Average VM CPU usage (Edge) (%),Energy consumption (Wh),Average energy consumption (Wh/Data center),Cloud energy consumption (Wh),Average Cloud energy consumption (Wh/Data center),Fog energy consumption (Wh),Average Fog energy consumption (Wh/Data center),Edge energy consumption (Wh),Average Edge energy consumption (Wh/Device),Dead devices count,Average remaining power (Wh),Average remaining power (%), First edge device death time (s),List of remaining power (%) (only battery powered devices / 0 = dead),List of the time when each device died (s)
2+
CLOUD_ONLY,TRADE_OFF,100,697.2075,0.6338,236.685,0.2152,1100,1063,37,37,0,0,0,1100,1063,0,0,0,0,2200.0,1100.0,2200.0,1030.7000000000105,0.0,0.0,149.7329496261313,0.079,5.7639,0,0,1.82,0.0177,0.7923,0.7923,0.201,0.1005,0.8268,0.0083,0,17.4421,99.954,-1.0,[99.92610934744268- 99.95628853615521- 99.95628853615521- 99.95511675485008- 99.95511675485008- 99.95511675485008- 99.95628853615521- 99.95511675485008- 99.95511675485008- 99.92610934744268- 99.95511675485008- 99.95628853615521- 99.95511675485008- 99.95511675485008- 99.95628853615521- 99.92610934744268- 99.95511675485008- 99.95511675485008- 99.95511675485008- 99.95511675485008- 99.95511675485008- 99.92610934744268- 99.95628853615521- 99.95628853615521- 99.95511675485008- 99.92610934744268- 99.95628853615521- 99.95511675485008- 99.95511675485008- 99.95511675485008- 99.96465444444445- 99.96465444444445- 99.96557722222222- 99.96465444444445- 99.96465444444445- 99.96465444444445- 99.96557722222222- 99.94181111111111- 99.96557722222222- 99.96557722222222- 99.96465444444445- 99.96465444444445- 99.96465444444445- 99.94181111111111- 99.94181111111111- 99.96465444444445- 99.94181111111111- 99.94181111111111- 99.96465444444445- 99.96557722222222],[]
3+
CLOUD_ONLY,TRADE_OFF,200,1258.395,0.5725,665.385,0.3027,2200,2101,99,99,0,0,0,2200,2101,0,0,0,0,4399.0,2201.0,4399.0,1857.699999999896,0.0,0.0,92.31135562687913,0.0806,11.5277,0,0,3.293,0.0162,1.4691,1.4691,0.201,0.1005,1.6229,0.0081,0,17.4422,99.9547,-1.0,[99.92610934744268- 99.95511675485008- 99.95628853615521- 99.95511675485008- 99.92610934744268- 99.95628853615521- 99.95511675485008- 99.92610934744268- 99.95511675485008- 99.95511675485008- 99.95511675485008- 99.92610934744268- 99.95511675485008- 99.95511675485008- 99.95511675485008- 99.92610934744268- 99.92610934744268- 99.95628853615521- 99.95511675485008- 99.95511675485008- 99.95511675485008- 99.95628853615521- 99.95628853615521- 99.95628853615521- 99.95511675485008- 99.95511675485008- 99.95511675485008- 99.95511675485008- 99.95511675485008- 99.95511675485008- 99.92610934744268- 99.95628853615521- 99.92610934744268- 99.95511675485008- 99.95511675485008- 99.95628853615521- 99.95511675485008- 99.95628853615521- 99.95628853615521- 99.92610934744268- 99.95511675485008- 99.95511675485008- 99.95628853615521- 99.95511675485008- 99.92610934744268- 99.95628853615521- 99.95511675485008- 99.95628853615521- 99.95628853615521- 99.95511675485008- 99.95628853615521- 99.95511675485008- 99.95511675485008- 99.95511675485008- 99.95511675485008- 99.95628853615521- 99.95511675485008- 99.95628853615521- 99.95628853615521- 99.95511675485008- 99.96465444444445- 99.94181111111111- 99.96465444444445- 99.96557722222222- 99.96557722222222- 99.96557722222222- 99.96465444444445- 99.96465444444445- 99.96465444444445- 99.96465444444445- 99.96557722222222- 99.96465444444445- 99.96465444444445- 99.94181111111111- 99.96465444444445- 99.96557722222222- 99.96465444444445- 99.94181111111111- 99.94181111111111- 99.96465444444445- 99.96465444444445- 99.96465444444445- 99.96465444444445- 99.96465444444445- 99.96557722222222- 99.96465444444445- 99.96465444444445- 99.96465444444445- 99.96465444444445- 99.96465444444445- 99.96465444444445- 99.96465444444445- 99.96465444444445- 99.96557722222222- 99.94181111111111- 99.96465444444445- 99.94181111111111- 99.94181111111111- 99.96557722222222- 99.96465444444445],[]

0 commit comments

Comments
 (0)