[EdgeCloudSim] - How to generate EdgeCloudSim MATLAB graphs

1 minute read

Updated:

๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป A Final Year Project on Edge Computing that simulates and evaluates different edge architectures

Project Overview Post

๐Ÿ‘โ€๐Ÿ—จ How to invoke MATLAB graphs for EdgeCloudSim

There isnโ€™t a lot of documentation about EdgeCloudSim, more so of how to actually generate these beautiful MATLAB graphs. In this post Iโ€™ll go through a step by step of how to do so.

(A)ย ย 100 Mbps (B)ย ย 300 Mbps (C)ย ย 500 Mbps
image image image

1. Run the simulation

Please refer to my previous postโ€™s Installation section to see how to run the simulation.

  • The output will be saved at sample_app1/output/
  • The simulator outputs the results of n iterations, where the โ€˜ite.logโ€™ files are provided as a human-readable log of the simulation results, and files in folder iteโ€™nโ€™ to be fed to MATLAB for plot generation

2. Edit getConfiguration.m file to define your output log folder path

The file resides on sample_app1/matlab/getConfiguration.m. Make sure you define the path with ite output logs like below.

Screenshot 2022-03-21 at 2 05 35 pm

Filepath

ret_val = '/Users/chaerim/EdgeCloudSim-master/scripts/sample_app1/output/02-04-2020_21-16/default_config';

Screenshot 2022-03-21 at 1 55 51 pm

Change this line depending on your configuration.

2-2. For Mac/Linux user: edit โ€˜plotGenericResults.mโ€™ โ€˜s filepath line from โ€˜' to โ€˜/โ€™(line 24)

Below code will parse the path for individual files and feed it to the functions. You might need to fiddle with these two files a little - the problematic part that took me a while to figure out.๐Ÿคฃ

filePath = strcat(folderPath,'/ite',int2str(s),'/SIMRESULT_',char(scenarioType(i)),'_NEXT_FIT_',int2str(mobileDeviceNumber),'DEVICES_',appType,'_GENERIC.log');

Screenshot 2022-03-21 at 2 01 28 pm

3. Invoke plot__.m files as you need (NOT the plotGenericResults file)

4. Voila! Repeat the above for different simulation output folders.

Hope this helped. Let me know if you need any further clarification.

Leave a comment