GithubHelp home page GithubHelp logo

rltaskoffloading's Introduction

RLTaskOffloading

Prerequisites

The code requires python3 (>=3.5) with the development headers. You'll also need system packages CMake, OpenMPI, graphviz and zlib. Those can be installed as follows

Ubuntu

sudo apt-get update && sudo apt-get install cmake libopenmpi-dev python3-dev zlib1g-dev
sudo apt-get install graphviz

Configure the virtual environment:

It is better to use a virtual environment (e.g., Anaconda) to run the code. About how to install anaconda, please refer to the official website: https://www.anaconda.com

Once you have anaconda installed, run

conda env create -f environment.yaml

To create the virtual environment. The current version of the code only supports TensorFlow 1.x (>=1.5).

Run the code

We implemented two DRL-based algorithms for task offloading: DRLTO and DDQNTO.

To train and evaluate DRLTO under different scenarios, run

# train and evaluate DRLTO with different number of tasks and LO target.
python train.py --algo DRLTO --scenario Number --goal LO --dependency True 
# train and evaluate DRLTO with different number of tasks and EE target.
python train.py --algo DRLTO --scenario Number --goal EE --dependency True 
# train and evaluate DRLTO with different transmission rate and LO target.
python train.py --algo DRLTO --scenario Trans --goal LO --dependency True 
# train and evaluate DRLTO with different transmission rate and EE target.
python train.py --algo DRLTO --scenario Trans --goal EE --dependency True 

To train DRLTO without considering task dependency, run

# train and evaluate DRLTO with different number of tasks and LO target without considering dependency
python train.py --algo DRLTO --scenario Number --goal LO --dependency False 

To train and evaluate DDQNTO under different scenarios, run

# train and evaluate DDQNTO with different number of tasks and LO target. In DDQNTO we do not consider the dependency.
python train.py --algo DDQNTO --scenario Number --goal LO --dependency False 
# train and evaluate DDQNTO with different number of tasks and EE target.
python train.py --algo DDQNTO --scenario Number --goal EE --dependency False 
# train and evaluate DDQNTO with different transmission rate and LO target.
python train.py --algo DDQNTO --scenario Trans --goal LO --dependency False 
# train and evaluate DDQNTO with different transmission rate and EE target.
python train.py --algo DDQNTO --scenario Trans --goal EE --dependency False 

The running results can be found in the log folder (default path of log folder is './log/Result')

To evaluate the heuristic algorithms, run

python evaluate_heuristic_algo.py --scenario Number --goal LO
python evaluate_heuristic_algo.py --scenario Number --goal EE
python evaluate_heuristic_algo.py --scenario Trans --goal LO
python evaluate_heuristic_algo.py --scenario Trans --goal EE

Related publication

If you are interested in this work, please cite the paper

@article{Wang2021Depedent,
  author={Wang, Jin and Hu, Jia and Min, Geyong and Zhan, Wenhan and Zomaya, Albert and Georgalas, Nektarios},
  journal={IEEE Transactions on Computers}, 
  title={Dependent Task Offloading for Edge Computing based on Deep Reinforcement Learning}, 
  year={2021},
  doi={10.1109/TC.2021.3131040}}

rltaskoffloading's People

Contributors

linkpark avatar tianhaotao avatar

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.