Code Monkey home page Code Monkey logo

mec_offloading's Introduction

MEC_offloading

Code for generating Intelligent Dynamic Data Offloading in a Competitive Mobile Edge Computing Market paper's simulation results. https://www.mdpi.com/1999-5903/11/5/118/pdf

Abstract

Software Defined Networks (SDN) and Mobile Edge Computing (MEC), capable of dynamically managing and satisfying the end-users computing demands, have emerged as key enabling technologies of 5G networks. In this paper, the joint problem of MEC server selection by the end-users and their optimal data offloading, as well as the optimal price setting by the MEC servers is studied in a multiple MEC servers and multiple end-users environment. The flexibility and programmability offered by the SDN technology, enables the realistic implementation of the proposed framework. Initially, an SDN controller executes a reinforcement learning framework based on the theory of stochastic learning automata towards enabling the end-users to select a MEC server to offload their data. The discount offered by the MEC server, its congestion and its penetration in terms of serving end-users' computing tasks, and its announced pricing for its computing services are considered in the overall MEC selection process. To determine the end-users' data offloading portion to the selected MEC server, a non-cooperative game among the end-users of each server is formulated and the existence and uniqueness of the corresponding Nash Equilibrium is shown. An optimization problem of maximizing the MEC servers' profit is formulated and solved in order to determine the MEC servers' optimal pricing with respect to their offered computing services and the received offloaded data. To realize the proposed framework, an iterative and low-complexity algorithm is introduced and designed. The performance of the proposed approach is evaluated through modeling and simulation under several scenarios, with both homogeneous and heterogeneous end-users.

Prerequisites

Clone the repository locally

git clone https://github.com/vinPopulaire/MEC_offloading.git

Create a python virtual environment

virtualenv -p python3 env
source env/bin/activate

Install dependacies

pip install -r requirements.txt

Create folders inside project root folder to store results

mkdir saved_runs
mkdir saved_runs/parameters
mkdir saved_runs/results
mdkir saved_runs/results/individual
mkdir plots

Run simulations

Set general parameters of the simulation

vim paremeters.py

Set cases to run and number of repetitions of the simulation

vim simulations.py

Run simulation

ipython simulation.py

Generate results from multiple runs of the simulation

Set parameters to match the ones you set on the simulations

vim generate_aggregated_results.py

Run the script for the aggregation of results

ipython generate_aggregeted_results.py

Create plots

Set parameters for the generation of plots

vim create_plots.py
vim plots_comparative.py

Run plot functions to generate the plots used in the paper

ipython create_plots.py
ipython plots_comparative.py

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

mec_offloading's People

Contributors

dependabot[bot] avatar vinpopulaire avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mec_offloading's Issues

parameters.py

Hello, where do the loaded parameter data come from? The data generated by "LOAD_SAVED_PARAMETERS = Flase" can't be loaded normally, can you help me?

plots problem

hi,I have some problem when i run create_plots.py, the output figure is too small. Do you know how to solve this problem?

微信截图_20201120172808

How to generate test cases

when I run the simulation.py,terminal displays the following information:
1、
Repetition no: 1
Loading parameters

FileNotFoundError Traceback (most recent call last)
~\Desktop\MEC_offloading-master\simulation.py in
50 infile = "saved_runs/parameters/" + case["users"] + "_" + case["servers"] + "lr" + "0.20"
51
---> 52 with open(infile, 'rb') as in_strm:
53 params = dill.load(in_strm)
54 else:

FileNotFoundError: [Errno 2] No such file or directory: 'saved_runs/parameters/hetero_hetero_lr_0.20'
2、
FileNotFoundError Traceback (most recent call last)
~\Desktop\MEC_offloading-master\generate_aggregated_results.py in
31 # infile = "/media/giorgos/My Passport/Programming/MEC offloading/parameters/" + key + "lr" + lr
32 infile = "saved_runs/parameters/" + key + "lr" + lr
---> 33 with open(infile, 'rb') as in_strm:
34 params = dill.load(in_strm)
35

FileNotFoundError: [Errno 2] No such file or directory: 'saved_runs/parameters/hetero_hetero_lr_0.20'

could you tell me how to solve this problem? Thank you very much!

image
image

Some problems encountered when running the code

when I run the plots_comparative.py,terminal displays the following information:

FileNotFoundError Traceback (most recent call last)
~\Desktop\MEC_offloading-master\plots_comparative.py in
44 infile = "saved_runs/results/" + key + "lr" + "0.20"
45
---> 46 with open(infile, 'rb') as in_strm:
47 results[key] = dill.load(in_strm)
48

FileNotFoundError: [Errno 2] No such file or directory: 'saved_runs/results/hetero_hetero_offload_dyn_lr_0.20'

could you tell me how to solve this problem?How to generate related files?Thank you very much!
image

Show file not found

when i run plots_comparative.py

it happen:
Traceback (most recent call last):
File "D:/Programs/Workspaces/pycharm/MEC_offloading-master_RL/src/plots_comparative.py", line 49, in
with open(infile, 'rb') as in_strm:
FileNotFoundError: [Errno 2] No such file or directory: 'saved_runs/results/hetero_hetero_offload_dyn_lr_0.20'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.