CagataySonmez / EdgeCloudSim

EdgeCloudSim: An Environment for Performance Evaluation of Edge Computing Systems
GNU General Public License v3.0
420 stars 228 forks source link

how can i use the matlab file to plot graphics? #29

Open supermilkhero opened 5 years ago

supermilkhero commented 5 years ago

Hi, I ran simulations directly on Eclipse, the resluts are saved in EdgeCloudSim-master/sim_results/ite1. But I failed to run the matlab files to drew those results, could you please tell me in detail which parameters should be modified in the matlab file, thanks a lot!

CagataySonmez commented 5 years ago

You can plot the graphs after the simulation is ended and the results are saved. The results can be saved different location depending on how you run the simulations. If you ran simulations without the command line arguments (e.g. directly on Eclipse), the results are saved under EdgeCloudSim/sim_results/iten (n is the iteration number) as defined in mainApp.java. If you run simulations via scripts/sample_application/run_scenario.sh script, the results will be saved as ite_n.tgz under EdgeCloudSim/scripts/sample_appn/output/$date folder (n is the app id).

Before plotting the graphs, you should adjust the getConfiguration.m file according to the simulation settings, e.g. the output folder path, the number of iterations and the scenario names. getConfiguration is a helper function, the other matlab functions use it to get simulation settings. Modifying the following lines in getConfiguration.m file should be enough if you are using the sample applications given in the source code:

if(argType == 1)
     ret_val = 'D:\sim_results'; %output folder
 elseif(argType == 2)
     ret_val = 1; %Number of iterations

Please do not invoke the plotGenericResult function to plot the graphs, it is a helper function so that it should not be directly invoked. the plotGenericResult function is invoked by the other (plotter) matlab functions with proper arguments; you can see an example usage in the plotAvgFailedTask.m file.

Deniece-long commented 4 years ago

Can you tell me how to call the.m file in matlab?Because it's all function files, I don't understand the main file, i don't understand how to relate the result on eclipse to the.m file.

ericbig66 commented 4 years ago

if you are using linux or mac you need to change all the '\' to '/', and this just fix my bug on plotting

wanSryso commented 3 years ago

Can you tell me how to call the.m file in matlab After i change the file path

wanSryso commented 3 years ago

do i need to install matlab?