From 1e91364305da0924b12e982630a3a896b8c2da18 Mon Sep 17 00:00:00 2001 From: Cagatay Sonmez Date: Fri, 8 Feb 2019 18:01:34 +0300 Subject: [PATCH] bugfix/delay sensitivity value of the applications is added to SimSettings class delay sensitivity value was started to be used in the sample_app4. However this value is forgotten to read from the application configuration file. SimSettings class is now updated in a way to consider the delay sensitivity value of the applications. --- scripts/sample_app1/config/applications.xml | 4 ++++ scripts/sample_app2/config/applications.xml | 8 ++++---- scripts/sample_app3/config/applications.xml | 4 ++++ src/edu/boun/edgecloudsim/core/SimSettings.java | 4 ++++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/scripts/sample_app1/config/applications.xml b/scripts/sample_app1/config/applications.xml index 90d515b9..20c186e5 100644 --- a/scripts/sample_app1/config/applications.xml +++ b/scripts/sample_app1/config/applications.xml @@ -4,6 +4,7 @@ 30 20 5 + 0 45 15 1500 @@ -18,6 +19,7 @@ 20 20 30 + 0 10 20 1250 @@ -32,6 +34,7 @@ 20 40 60 + 0 60 60 2500 @@ -46,6 +49,7 @@ 30 15 7 + 0 15 45 25 diff --git a/scripts/sample_app2/config/applications.xml b/scripts/sample_app2/config/applications.xml index d72e5307..2d47b0d7 100644 --- a/scripts/sample_app2/config/applications.xml +++ b/scripts/sample_app2/config/applications.xml @@ -4,7 +4,7 @@ 30 20 2 - 0.9 + 0 40 20 1500 @@ -19,7 +19,7 @@ 20 20 3 - 0.7 + 0 45 90 20 @@ -34,7 +34,7 @@ 20 40 20 - 0.1 + 0 60 120 2500 @@ -49,7 +49,7 @@ 30 10 7 - 0.3 + 0 30 45 25 diff --git a/scripts/sample_app3/config/applications.xml b/scripts/sample_app3/config/applications.xml index daf7cfde..6ca973cf 100644 --- a/scripts/sample_app3/config/applications.xml +++ b/scripts/sample_app3/config/applications.xml @@ -4,6 +4,7 @@ 30 20 2 + 0 40 20 1500 @@ -18,6 +19,7 @@ 20 20 3 + 0 45 90 200 @@ -32,6 +34,7 @@ 20 40 20 + 0 60 120 2500 @@ -46,6 +49,7 @@ 30 10 7 + 0 30 45 250 diff --git a/src/edu/boun/edgecloudsim/core/SimSettings.java b/src/edu/boun/edgecloudsim/core/SimSettings.java index 7d0dc5bb..42a03d0a 100644 --- a/src/edu/boun/edgecloudsim/core/SimSettings.java +++ b/src/edu/boun/edgecloudsim/core/SimSettings.java @@ -479,6 +479,7 @@ public double[] getMobilityLookUpTable() * [9] vm utilization on edge (%) * [10] vm utilization on cloud (%) * [11] vm utilization on mobile (%) + * [12] delay sensitivity [0-1] */ public double[][] getTaskLookUpTable() { @@ -538,6 +539,7 @@ private void parseApplicatinosXML(String filePath) isElementPresent(appElement, "vm_utilization_on_edge"); isElementPresent(appElement, "vm_utilization_on_cloud"); isElementPresent(appElement, "vm_utilization_on_mobile"); + isElementPresent(appElement, "delay_sensitivity"); String taskName = appElement.getAttribute("name"); taskNames[i] = taskName; @@ -554,6 +556,7 @@ private void parseApplicatinosXML(String filePath) double vm_utilization_on_edge = Double.parseDouble(appElement.getElementsByTagName("vm_utilization_on_edge").item(0).getTextContent()); double vm_utilization_on_cloud = Double.parseDouble(appElement.getElementsByTagName("vm_utilization_on_cloud").item(0).getTextContent()); double vm_utilization_on_mobile = Double.parseDouble(appElement.getElementsByTagName("vm_utilization_on_mobile").item(0).getTextContent()); + double delay_sensitivity = Double.parseDouble(appElement.getElementsByTagName("delay_sensitivity").item(0).getTextContent()); taskLookUpTable[i][0] = usage_percentage; //usage percentage [0-100] taskLookUpTable[i][1] = prob_cloud_selection; //prob. of selecting cloud [0-100] @@ -567,6 +570,7 @@ private void parseApplicatinosXML(String filePath) taskLookUpTable[i][9] = vm_utilization_on_edge; //vm utilization on edge vm [0-100] taskLookUpTable[i][10] = vm_utilization_on_cloud; //vm utilization on cloud vm [0-100] taskLookUpTable[i][11] = vm_utilization_on_mobile; //vm utilization on mobile vm [0-100] + taskLookUpTable[i][12] = delay_sensitivity; //delay_sensitivity [0-1] } } catch (Exception e) {