# Risk_aware_MEC_offloading
Code for generating Data Offloading in UAV-assisted Multi-access Edge Computing Systems: A Resource-based Pricing and User Risk-awareness Approach paper's simulation results. https://www.mdpi.com/1424-8220/20/8/2434/pdf
## Abstract
Unmanned Aerial Vehicle (UAV)-assisted Multi-access Edge Computing (MEC) systems have emerged recently as a flexible and dynamic computing environment, providing task offloading service to the users. In order for such a paradigm to be viable, the operator of a UAV-mounted MEC server should enjoy some form of profit by offering its computing capabilities to the end users. To deal with this issue in this paper, we apply a usage-based pricing policy for allowing the exploitation of the servers’ computing resources. The proposed pricing mechanism implicitly introduces a more social behavior to the users with respect to competing for the UAV-mounted MEC servers' computation resources. In order to properly model the users' risk-aware behavior within the overall data offloading decision-making process the principles of Prospect Theory are adopted, while the exploitation of the available computation resources is considered based on the theory of the Tragedy of the Commons. Initially, the user's prospect-theoretic utility function is formulated by quantifying the user's risk seeking and loss aversion behavior, while taking into account the pricing mechanism. Accordingly, the users' pricing and risk-aware data offloading problem is formulated as a distributed maximization problem of each user's expected prospect-theoretic utility function and addressed as a non-cooperative game among the users. The existence of a Pure Nash Equilibrium (PNE) for the formulated non-cooperative game is shown based on the theory of submodular games. An iterative and distributed algorithm is introduced which converges to the PNE, following the learning rule of the best response dynamics. The performance evaluation of the proposed approach is achieved via modeling and simulation, and detailed numerical results are presented highlighting its key operation features and benefits.
## Prerequisites
Clone the repository locally
```
git clone https://github.com/vinPopulaire/Risk_aware_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 parameters, results and plots
```
mkdir plots saved_runs saved_runs/parameters saved_runs/results saved_runs/results/individual
```
(Optional) Create subfolders inside individual to store results in such a way that the create_plots function to generate the results of the paper works
```
cd saved_runs/results/individual
mkdir different\ an different\ c different \kn different\ N different\ N\ an different\ N\ kn different\ offloading different\ type
```
## Run simulations
Set general parameters of the simulation (ATTENTION some of the parameters are redifined inside the simulation.py)
```
vim parameters.py
```
Run simulation
```
ipython simulation.py
```
## Create plots that appear in the paper
You can play with the parameters used in the simulation in order to see how the model reacts to changes of each parameter. In order to do so, you can specify the list of values for the specified parameter (or just uncomment the lists provided).
```
vim simulation.py
```
In order to create the plots found in the paper you have to populate the results folders. When a simulation runs, the results are saved inside the saved_runs/results/individual folder. After you run a simulation with a varying parameter, you have to manually move the results inside the corresponding folder.
### Example
If you want to run a simulation with varying costs, you have to:
- set SAVE_RESULTS = True in parameters.py
- uncomment cpars = np.linspace(0.1,0.9,33) and comment cpars = [0.5] in simulation.py
- run simulation.py
- manually move generated results in saved_runs/results/individual inside the different c folder
After you have created all the needed results, you can run
```
ipython create_plots.py
```
in order to generate the plots.
If not all plots are needed, you have to comment out the part of the function create_plots.py that you don't need
## Authors
* **Giorgos Mitsis** - [vinpopulaire](https://github.com/vinPopulaire)
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
没有合适的资源?快使用搜索试试~ 我知道了~
用户风险意识资源定价博弈python代码.zip
![preview](https://csdnimg.cn/release/downloadcmsfe/public/img/white-bg.ca8570fa.png)
共13个文件
py:9个
md:2个
txt:1个
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 157 浏览量
2024-05-21
23:30:49
上传
评论
收藏 1.98MB ZIP 举报
温馨提示
3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
资源推荐
资源详情
资源评论
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/TXT.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PDF.png)
共 13 条
- 1
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/864ffdc5a26342a6add0026479aef1e5_matlab_dingdang.jpg!1)
![avatar-vip](https://csdnimg.cn/release/downloadcmsfe/public/img/user-vip.1c89f3c5.png)
matlab科研助手
- 粉丝: 2w+
- 资源: 2416
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)