From ff33bcea8191aec9a051fc33ff77cd3128f3d8f2 Mon Sep 17 00:00:00 2001 From: Stefan Schneider Date: Wed, 12 Jan 2022 16:21:28 +0100 Subject: [PATCH] small adjustment of docs --- README.md | 2 +- docs/components.md | 10 ++++++++-- docs/examples.md | 14 ++++++++++++-- docs/index.rst | 6 ++++-- docs/installation.md | 6 +++--- 5 files changed, 28 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 2df8afc..f8072da 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Documentation and API: [ReadTheDocs](https://mobile-env.readthedocs.io/en/latest ### From PyPI (Recommended) -The simplest option is to install the latest release of `mobile-env` from PyPI using pip: +The simplest option is to install the latest release of `mobile-env` from [PyPI](https://pypi.org/project/mobile-env/) using pip: ```bash pip install mobile-env diff --git a/docs/components.md b/docs/components.md index 00e6282..b0bc6ba 100644 --- a/docs/components.md +++ b/docs/components.md @@ -1,8 +1,14 @@ (components)= -# Modules +# Packages -## Simulation +`mobile-env` is structured into four main packages, each with multiple modules: Core, handlers, scenarios, and wrappers. +These packages are described in the following. + + +## Core + +The core package contains the core simulation logic of `mobile-env`. The [base environment](https://mobile-env.readthedocs.io/en/latest/source/mobile_env.core.html#mobile_env.core.base.MComCore) class simulates cell assignment of many user equipments (UEs) to possibly multiple basestations (BSs) in a mobile communication setting. Our simulation is mainly composed of five components that implement their functionality in a replacable manner: diff --git a/docs/examples.md b/docs/examples.md index 15fddf2..655b2d8 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -2,13 +2,14 @@ # Examples -## Examples on Google Colab +## Example on Google Colab We provide an in-depth example of mobile-env's usage on Google Colab! The notebook shows how to train multi-agent reinforcement learning policies with [RLlib](https://docs.ray.io/en/stable/rllib.html) and centralized control policies with [stable-baselines3](https://stable-baselines3.readthedocs.io/en/master/index.html). -[![Open in colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/stefanbschneider/mobile-env/blob/master/examples/tutorial.ipynb) +[![Open in colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/stefanbschneider/mobile-env/blob/master/examples/demo.ipynb) ## Environment Creation +`mobile-env` follows the OpenAI Gym interface. Here is an example of how mobile-env's environments can be created: ```python import gym @@ -23,4 +24,13 @@ env = gym.make('mobile-large-central-v0') # small environment; multi-agent control env = gym.make('mobile-large-ma-v0') ... + +# then run the environment +obs = env.reset() +done = False + +while not done: + action = ... # Your agent code here + obs, reward, done, info = env.step(action) + env.render() ``` diff --git a/docs/index.rst b/docs/index.rst index cf1d2a5..779ee7f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,12 +9,14 @@ :target: https://mobile-env.readthedocs.io/en/latest/?badge=latest .. |Publish| image:: https://github.com/stefanbschneider/mobile-env/actions/workflows/python-publish.yml/badge.svg :target: https://github.com/stefanbschneider/mobile-env/actions/workflows/python-publish.yml +.. |Colab| image:: https://colab.research.google.com/assets/colab-badge.svg + :target: https://colab.research.google.com/github/stefanbschneider/mobile-env/blob/master/examples/demo.ipynb -|Python package| |Documentation Status| |Publish| +|Python package| |Documentation Status| |Publish| |Colab| Welcome to Mobile-Env's documentation! ====================================== -This project open-sources a minimalist environment for cell selection in wireless mobile networks. +This project is a minimalist, open-source environment for cell selection in wireless mobile networks. This documentation provides: diff --git a/docs/installation.md b/docs/installation.md index f804072..f921bc1 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -7,11 +7,11 @@ This project requires python3 (>=3.7) ## Stable release To install the latest stable version with `pip`, run: ```bash -pip install mobile_env +pip install -U mobile-env ``` ## Development version -The development version can be installed with `poetry`: +The development version can be installed after cloning the [GitHub repository](https://github.com/stefanbschneider/mobile-env): ```bash -poetry add git+https://github.com/stefanbschneider/mobile-env +pip install -e . ```