Giter Club home page Giter Club logo

czjgg / v2x-gym Goto Github PK

View Code? Open in Web Editor NEW

This project forked from a3794110/v2x-gym

0.0 0.0 0.0 686.18 MB

A vehicular network simulator (SUMO+ns-3) encapsulated behind Gym API (OpenAI-Gym), which allows users to evaluate RL-enhanced vehicular network. Furthermore, the V2X-Gym accepts XML-format files as input to configure complex vehicular network simulation environment.

License: GNU General Public License v2.0

Shell 0.05% C++ 36.59% Python 62.28% Perl 0.44% C 0.48% MATLAB 0.06% Gnuplot 0.01% Makefile 0.05% Batchfile 0.01% Click 0.03%

v2x-gym's Introduction

V2X-Gym: a Reinforcement Leanring Framework for Evaluating RL-enhanced Vehiculr Network Algorithms

The V2X-Gym is the integration of the OpenAI-Gym API (an RL framework), SUMO (a traffic simulator) and nsโ€“3 (a de-fecto network simulator), which inherits the ns3-gym toolkit to build a standardized evironment for RL-enhanced vehicular network algorithm evaluaiton.

Goals

  1. RL-enhanced vehicular network environment: The V2X-Gym framework encapsulates a proposed vehicular network simulator, which integrates SUMO and ns-3 via a client-server architecture. The encapsulated simulator provides an interface allowing an external process (agent) to interact with the simulated vehicular network environment via OpenAI-Gym API.

  2. Language-agnostic setting system: To simplify the complexity of configuring the V2X-Gym framework, we implement a language-agnostic setting system, allowing users to configure the V2X-Gym via human-readable configuration files written in XML-format.

  3. Extensible framework structure: The V2X-Gym framework provides several registration methods allowing newly proposed ns-3 network models to be added to the framework. The registered network models will be integrated to the built-in V2X-Gym functionalities, including the proposed RL-enhanced vehicular network environment and language-agnostic setting system.

Author

Ping-Han Hsieh, Natinal Tsing Hua Uiversity, Institue of Communications Engineering, [email protected]

Version

0.9

Installation

  1. Install SUMO and its required dependencies.
sudo apt-get install cmake python g++ libxerces-c-dev libfox-1.6-dev libgdal-dev libproj-dev libgl2ps-dev swig
git clone --recursive https://github.com/eclipse/sumo
export SUMO_HOME="$PWD/sumo"
sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.1 /usr/lib/libGL.so
mkdir sumo/build/cmake-build && cd sumo/build/cmake-build
cmake ../..
make -j$(nproc)
  1. Install all required dependencies required by ns-3.
# minimal requirements for C++:
apt-get install gcc g++ python

see https://www.nsnam.org/wiki/Installation
  1. Install xml element
pip install elementpath
  1. Install ZMQ and Protocol Buffers libs:
# to install protobuf-3.6 on ubuntu 16.04:
sudo add-apt-repository ppa:maarten-fonville/protobuf
sudo apt-get update

apt-get install libzmq5 libzmq5-dev
apt-get install libprotobuf-dev
apt-get install protobuf-compiler
  1. Configure and build ns-3 project (if you are going to use Python virtual environment, please execute these commands inside it):
# Opengym Protocol Buffer messages (C++ and Python) are build during configure
CXXFLAGS="-Wall" ./waf configure
./waf build
  1. Install v2xgym located in src/opengym/model/ns3gym (Python3 required)
pip3 install ./src/opengym/model/ns3gym
  1. (Optional) Install all libraries required by your agent (like tensorflow, keras, etc.).

User Manual

The user manual of V2X-Gym is offered in the following link:

https://hackmd.io/qtCFqx6uSXiO3V31MgjjCw?view

Future works

We will update architecture document and user manual in few weeks.

v2x-gym's People

Contributors

a3794110 avatar book30627 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.